diff options
author | Péter Szilágyi <peterke@gmail.com> | 2018-02-23 20:02:33 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-02-23 20:02:33 +0800 |
commit | 89f914c03075012603267d207de0f433740dcd30 (patch) | |
tree | b238412877c8803159fb0841babc2985ca3cd486 /core/genesis_test.go | |
parent | fb5d085234c16f18d27be10043c53da3230cd9a7 (diff) | |
download | dexon-89f914c03075012603267d207de0f433740dcd30.tar dexon-89f914c03075012603267d207de0f433740dcd30.tar.gz dexon-89f914c03075012603267d207de0f433740dcd30.tar.bz2 dexon-89f914c03075012603267d207de0f433740dcd30.tar.lz dexon-89f914c03075012603267d207de0f433740dcd30.tar.xz dexon-89f914c03075012603267d207de0f433740dcd30.tar.zst dexon-89f914c03075012603267d207de0f433740dcd30.zip |
core: flush out trie cache more meaningfully on stop (#16143)
* core: flush out trie cache more meaningfully on stop
* core: upgrade legacy tests to chain maker
Diffstat (limited to 'core/genesis_test.go')
-rw-r--r-- | core/genesis_test.go | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/core/genesis_test.go b/core/genesis_test.go index cd548d4b1..052ded699 100644 --- a/core/genesis_test.go +++ b/core/genesis_test.go @@ -118,10 +118,12 @@ func TestSetupGenesis(t *testing.T) { // Commit the 'old' genesis block with Homestead transition at #2. // Advance to block #4, past the homestead transition block of customg. genesis := oldcustomg.MustCommit(db) + bc, _ := NewBlockChain(db, nil, oldcustomg.Config, ethash.NewFullFaker(), vm.Config{}) defer bc.Stop() - bc.SetValidator(bproc{}) - bc.InsertChain(makeBlockChainWithDiff(genesis, []int{2, 3, 4, 5}, 0)) + + blocks, _ := GenerateChain(oldcustomg.Config, genesis, ethash.NewFaker(), db, 4, nil) + bc.InsertChain(blocks) bc.CurrentBlock() // This should return a compatibility error. return SetupGenesisBlock(db, &customg) |