OSDN Git Service

feat: add cross-chain output (#56)
[bytom/vapor.git] / account / accounts_test.go
index 62e07be..ad2a007 100644 (file)
@@ -7,13 +7,13 @@ import (
        "strings"
        "testing"
 
-       dbm "github.com/tendermint/tmlibs/db"
-
        "github.com/vapor/blockchain/pseudohsm"
        "github.com/vapor/blockchain/signers"
        "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"
 )
@@ -211,11 +211,11 @@ func mockAccountManager(t *testing.T) *Manager {
        }
        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)