OSDN Git Service

init delete the pow related (#55)
[bytom/vapor.git] / test / chain_test_util.go
index c358dde..fc9b9ec 100644 (file)
@@ -5,12 +5,11 @@ import (
        "os"
        "time"
 
-       dbm "github.com/tendermint/tmlibs/db"
-
        "github.com/golang/protobuf/proto"
        "github.com/vapor/blockchain/txbuilder"
        "github.com/vapor/consensus"
-       "github.com/vapor/database/leveldb"
+       "github.com/vapor/database"
+       dbm "github.com/vapor/database/leveldb"
        "github.com/vapor/database/storage"
        "github.com/vapor/protocol"
        "github.com/vapor/protocol/bc"
@@ -23,7 +22,7 @@ const utxoPrefix = "UT:"
 type chainTestContext struct {
        Chain *protocol.Chain
        DB    dbm.DB
-       Store *leveldb.Store
+       Store *database.Store
 }
 
 func (ctx *chainTestContext) validateStatus(block *types.Block) error {
@@ -250,7 +249,7 @@ func (cfg *chainTestConfig) Run() error {
                if err != nil {
                        return err
                }
-               err = SolveAndUpdate(ctx.Chain, block)
+               _, err = ctx.Chain.ProcessBlock(block)
                if err != nil && blk.Invalid {
                        continue
                }