aboutsummaryrefslogtreecommitdiffstats
path: root/core/genesis_test.go
diff options
context:
space:
mode:
authorPéter Szilágyi <peterke@gmail.com>2018-02-23 20:02:33 +0800
committerGitHub <noreply@github.com>2018-02-23 20:02:33 +0800
commit89f914c03075012603267d207de0f433740dcd30 (patch)
treeb238412877c8803159fb0841babc2985ca3cd486 /core/genesis_test.go
parentfb5d085234c16f18d27be10043c53da3230cd9a7 (diff)
downloadgo-tangerine-89f914c03075012603267d207de0f433740dcd30.tar
go-tangerine-89f914c03075012603267d207de0f433740dcd30.tar.gz
go-tangerine-89f914c03075012603267d207de0f433740dcd30.tar.bz2
go-tangerine-89f914c03075012603267d207de0f433740dcd30.tar.lz
go-tangerine-89f914c03075012603267d207de0f433740dcd30.tar.xz
go-tangerine-89f914c03075012603267d207de0f433740dcd30.tar.zst
go-tangerine-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.go6
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)