diff options
author | bojie <bojie@dexon.org> | 2019-01-07 15:40:56 +0800 |
---|---|---|
committer | Wei-Ning Huang <w@dexon.org> | 2019-01-14 15:26:26 +0800 |
commit | c90c2f0f036307824f1e64e8f0fba012fa1cc927 (patch) | |
tree | 06a84996647fae6039f293f0413bfad85ce35653 /eth | |
parent | c0f0675284c5d2aace6719f3774f7df422b0c1d1 (diff) | |
download | dexon-c90c2f0f036307824f1e64e8f0fba012fa1cc927.tar dexon-c90c2f0f036307824f1e64e8f0fba012fa1cc927.tar.gz dexon-c90c2f0f036307824f1e64e8f0fba012fa1cc927.tar.bz2 dexon-c90c2f0f036307824f1e64e8f0fba012fa1cc927.tar.lz dexon-c90c2f0f036307824f1e64e8f0fba012fa1cc927.tar.xz dexon-c90c2f0f036307824f1e64e8f0fba012fa1cc927.tar.zst dexon-c90c2f0f036307824f1e64e8f0fba012fa1cc927.zip |
app: implement logic for prepare/verify correctly when chain number change (#118)
Diffstat (limited to 'eth')
-rw-r--r-- | eth/helper_test.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/eth/helper_test.go b/eth/helper_test.go index 9a30afef3..e4d7a28fb 100644 --- a/eth/helper_test.go +++ b/eth/helper_test.go @@ -30,6 +30,7 @@ import ( "github.com/dexon-foundation/dexon/common" "github.com/dexon-foundation/dexon/consensus/ethash" "github.com/dexon-foundation/dexon/core" + "github.com/dexon-foundation/dexon/core/rawdb" "github.com/dexon-foundation/dexon/core/types" "github.com/dexon-foundation/dexon/core/vm" "github.com/dexon-foundation/dexon/crypto" @@ -61,6 +62,9 @@ func newTestProtocolManager(mode downloader.SyncMode, blocks int, generator func genesis = gspec.MustCommit(db) blockchain, _ = core.NewBlockChain(db, nil, gspec.Config, engine, vm.Config{}, nil) ) + if err := rawdb.WriteLastRoundNumber(db, 0); err != nil { + panic(err) + } chain, _ := core.GenerateChain(gspec.Config, genesis, ethash.NewFaker(), db, blocks, generator) if _, err := blockchain.InsertChain(chain); err != nil { panic(err) |