X-Git-Url: http://git.osdn.net/view?p=bytom%2Fvapor.git;a=blobdiff_plain;f=account%2Faccounts_test.go;h=ad2a007ddcf7166f9fac7432c862e7fd1dc4281e;hp=413283ad6ecf1a6c7b1c61fe71596516b361c2e4;hb=a8fcbab90cbbfcc0acea0a4bd1389e39ece3da56;hpb=cda7a0115c222db259b852fa6999c6396f6028e3 diff --git a/account/accounts_test.go b/account/accounts_test.go index 413283ad..ad2a007d 100644 --- a/account/accounts_test.go +++ b/account/accounts_test.go @@ -7,14 +7,13 @@ import ( "strings" "testing" - dbm "github.com/tendermint/tmlibs/db" - "github.com/vapor/blockchain/pseudohsm" "github.com/vapor/blockchain/signers" - "github.com/vapor/consensus" "github.com/vapor/crypto/ed25519/chainkd" - "github.com/vapor/database/leveldb" + "github.com/vapor/database" + dbm "github.com/vapor/database/leveldb" "github.com/vapor/errors" + "github.com/vapor/event" "github.com/vapor/protocol" "github.com/vapor/testutil" ) @@ -206,20 +205,17 @@ func TestGetAccountIndexKey(t *testing.T) { } func mockAccountManager(t *testing.T) *Manager { - - consensus.ActiveNetParams.Signer = "78673764e0ba91a4c5ba9ec0c8c23c69e3d73bf27970e05e0a977e81e13bde475264d3b177a96646bc0ce517ae7fd63504c183ab6d330dea184331a4cf5912d5" - dirPath, err := ioutil.TempDir(".", "") if err != nil { t.Fatal(err) } defer os.RemoveAll(dirPath) - testDB := dbm.NewDB("testdb", "memdb", "temp") - defer os.RemoveAll("temp") + testDB := dbm.NewDB("testdb", "memdb", dirPath) + dispatcher := event.NewDispatcher() - store := leveldb.NewStore(testDB) - txPool := protocol.NewTxPool(store) + store := database.NewStore(testDB) + txPool := protocol.NewTxPool(store, dispatcher) chain, err := protocol.NewChain(store, txPool) if err != nil { t.Fatal(err)