OSDN Git Service

versoin1.1.9 (#594)
[bytom/vapor.git] / test / util.go
index d89ddd5..bcce45f 100644 (file)
@@ -4,18 +4,19 @@ import (
        "context"
        "time"
 
-       "github.com/vapor/account"
-       "github.com/vapor/blockchain/pseudohsm"
-       "github.com/vapor/blockchain/txbuilder"
-       "github.com/vapor/consensus"
-       "github.com/vapor/crypto/ed25519/chainkd"
-       "github.com/vapor/database"
-       dbm "github.com/vapor/database/leveldb"
-       "github.com/vapor/event"
-       "github.com/vapor/protocol"
-       "github.com/vapor/protocol/bc"
-       "github.com/vapor/protocol/bc/types"
-       "github.com/vapor/protocol/vm"
+       "github.com/bytom/vapor/account"
+       "github.com/bytom/vapor/blockchain/pseudohsm"
+       "github.com/bytom/vapor/blockchain/txbuilder"
+       "github.com/bytom/vapor/config"
+       "github.com/bytom/vapor/consensus"
+       "github.com/bytom/vapor/crypto/ed25519/chainkd"
+       "github.com/bytom/vapor/database"
+       dbm "github.com/bytom/vapor/database/leveldb"
+       "github.com/bytom/vapor/event"
+       "github.com/bytom/vapor/protocol"
+       "github.com/bytom/vapor/protocol/bc"
+       "github.com/bytom/vapor/protocol/bc/types"
+       "github.com/bytom/vapor/protocol/vm"
 )
 
 const (
@@ -25,10 +26,11 @@ const (
 
 // MockChain mock chain with genesis block
 func MockChain(testDB dbm.DB) (*protocol.Chain, *database.Store, *protocol.TxPool, error) {
+       config.CommonConfig = config.DefaultConfig()
        store := database.NewStore(testDB)
        dispatcher := event.NewDispatcher()
-       txPool := protocol.NewTxPool(store, dispatcher)
-       chain, err := protocol.NewChain(store, txPool, dispatcher)
+       txPool := protocol.NewTxPool(store, nil, dispatcher)
+       chain, err := protocol.NewChain(store, txPool, nil, dispatcher)
        return chain, store, txPool, err
 }