aboutsummaryrefslogtreecommitdiffstats
path: root/core/blockchain_test.go
diff options
context:
space:
mode:
authorbojie <bojie@dexon.org>2019-01-07 15:40:56 +0800
committerWei-Ning Huang <w@byzantine-lab.io>2019-06-12 17:27:21 +0800
commitbc788bdf15656f8e867cf9a81769fb280b5bfb49 (patch)
treebd8ef519f56308878520bb7a5589dbdcb3970bfa /core/blockchain_test.go
parent4ca846ead9a66792a6b6b0e1ab8323b2f056b6f3 (diff)
downloadgo-tangerine-bc788bdf15656f8e867cf9a81769fb280b5bfb49.tar
go-tangerine-bc788bdf15656f8e867cf9a81769fb280b5bfb49.tar.gz
go-tangerine-bc788bdf15656f8e867cf9a81769fb280b5bfb49.tar.bz2
go-tangerine-bc788bdf15656f8e867cf9a81769fb280b5bfb49.tar.lz
go-tangerine-bc788bdf15656f8e867cf9a81769fb280b5bfb49.tar.xz
go-tangerine-bc788bdf15656f8e867cf9a81769fb280b5bfb49.tar.zst
go-tangerine-bc788bdf15656f8e867cf9a81769fb280b5bfb49.zip
app: implement logic for prepare/verify correctly when chain number change (#118)
Diffstat (limited to 'core/blockchain_test.go')
-rw-r--r--core/blockchain_test.go6
1 files changed, 6 insertions, 0 deletions
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()