From bc788bdf15656f8e867cf9a81769fb280b5bfb49 Mon Sep 17 00:00:00 2001 From: bojie Date: Mon, 7 Jan 2019 15:40:56 +0800 Subject: app: implement logic for prepare/verify correctly when chain number change (#118) --- core/blockchain_test.go | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'core/blockchain_test.go') diff --git a/core/blockchain_test.go b/core/blockchain_test.go index e8d96e5c8..6468e984d 100644 --- a/core/blockchain_test.go +++ b/core/blockchain_test.go @@ -654,6 +654,9 @@ func TestFastVsFullChains(t *testing.T) { // Fast import the chain as a non-archive node to test fastDb := ethdb.NewMemDatabase() gspec.MustCommit(fastDb) + if err := rawdb.WriteLastRoundNumber(fastDb, 0); err != nil { + t.Fatalf("failed to write last round: %v", err) + } fast, _ := NewBlockChain(fastDb, nil, gspec.Config, ethash.NewFaker(), vm.Config{}, nil) defer fast.Stop() @@ -745,6 +748,9 @@ func TestLightVsFastVsFullChainHeads(t *testing.T) { // Import the chain as a non-archive node and ensure all pointers are updated fastDb := ethdb.NewMemDatabase() gspec.MustCommit(fastDb) + if err := rawdb.WriteLastRoundNumber(fastDb, 0); err != nil { + t.Fatalf("failed to write last round: %v", err) + } fast, _ := NewBlockChain(fastDb, nil, gspec.Config, ethash.NewFaker(), vm.Config{}, nil) defer fast.Stop() -- cgit