Update go-crypto, move testutils into types

This commit is contained in:
Ethan Frey
2017-02-25 00:12:15 +01:00
parent 4ad645f318
commit 1fd2d17cd9
9 changed files with 57 additions and 74 deletions
+2 -3
View File
@@ -5,7 +5,6 @@ import (
"time"
"github.com/gorilla/websocket"
"github.com/tendermint/basecoin/testutils"
"github.com/tendermint/basecoin/types"
cmn "github.com/tendermint/go-common"
crypto "github.com/tendermint/go-crypto"
@@ -38,10 +37,10 @@ func main() {
}()
// Get the root account
root := testutils.PrivAccountFromSecret("test")
root := types.PrivAccountFromSecret("test")
sequence := int(0)
// Make a bunch of PrivAccounts
privAccounts := testutils.RandAccounts(1000, 1000000, 0)
privAccounts := types.RandAccounts(1000, 1000000, 0)
privAccountSequences := make(map[string]int)
// Send coins to each account
+4 -5
View File
@@ -4,7 +4,6 @@ import (
"testing"
"github.com/tendermint/basecoin/app"
"github.com/tendermint/basecoin/testutils"
"github.com/tendermint/basecoin/types"
cmn "github.com/tendermint/go-common"
crypto "github.com/tendermint/go-crypto"
@@ -19,8 +18,8 @@ func TestSendTx(t *testing.T) {
bcApp.SetOption("base/chainID", chainID)
t.Log(bcApp.Info())
test1PrivAcc := testutils.PrivAccountFromSecret("test1")
test2PrivAcc := testutils.PrivAccountFromSecret("test2")
test1PrivAcc := types.PrivAccountFromSecret("test1")
test2PrivAcc := types.PrivAccountFromSecret("test2")
// Seed Basecoin with account
test1Acc := test1PrivAcc.Account
@@ -66,14 +65,14 @@ func TestSequence(t *testing.T) {
t.Log(bcApp.Info())
// Get the test account
test1PrivAcc := testutils.PrivAccountFromSecret("test1")
test1PrivAcc := types.PrivAccountFromSecret("test1")
test1Acc := test1PrivAcc.Account
test1Acc.Balance = types.Coins{{"", 1 << 53}}
t.Log(bcApp.SetOption("base/account", string(wire.JSONBytes(test1Acc))))
sequence := int(1)
// Make a bunch of PrivAccounts
privAccounts := testutils.RandAccounts(1000, 1000000, 0)
privAccounts := types.RandAccounts(1000, 1000000, 0)
privAccountSequences := make(map[string]int)
// Send coins to each account