OSDN Git Service

Fix block fetcher block insert bug (#95)
[bytom/vapor.git] / test / bench_blockchain_test.go
index e987946..f5f7783 100644 (file)
@@ -11,13 +11,14 @@ import (
        "github.com/vapor/blockchain/pseudohsm"
        "github.com/vapor/blockchain/signers"
        "github.com/vapor/blockchain/txbuilder"
+       "github.com/vapor/config"
        "github.com/vapor/consensus"
        "github.com/vapor/crypto/ed25519/chainkd"
        "github.com/vapor/database"
        dbm "github.com/vapor/database/leveldb"
        "github.com/vapor/database/storage"
        "github.com/vapor/event"
-       "github.com/vapor/mining"
+       "github.com/vapor/proposal"
        "github.com/vapor/protocol"
        "github.com/vapor/protocol/bc"
        "github.com/vapor/protocol/bc/types"
@@ -137,6 +138,7 @@ func GenerateChainData(dirPath string, testDB dbm.DB, txNumber, otherAssetNum in
                return nil, nil, nil, err
        }
 
+       config.CommonConfig = config.DefaultConfig()
        store := database.NewStore(testDB)
        dispatcher := event.NewDispatcher()
        txPool := protocol.NewTxPool(store, dispatcher)
@@ -157,7 +159,7 @@ func InsertChain(chain *protocol.Chain, txPool *protocol.TxPool, txs []*types.Tx
                }
        }
 
-       block, err := mining.NewBlockTemplate(chain, txPool, nil)
+       block, err := proposal.NewBlockTemplate(chain, txPool, nil)
        if err != nil {
                return err
        }