aboutsummaryrefslogtreecommitdiffstats
path: root/core/genesis.go
diff options
context:
space:
mode:
authorbojie <bojie@dexon.org>2019-01-07 15:40:56 +0800
committerWei-Ning Huang <w@dexon.org>2019-04-09 21:32:56 +0800
commit9c110d37d09d40235b140ca7197515d5c60052c4 (patch)
treec88508bbb7ccbd430268c5bb44da2226e83b3b27 /core/genesis.go
parent3e405c7fdc936d3cdb516273105efc233144965c (diff)
downloaddexon-9c110d37d09d40235b140ca7197515d5c60052c4.tar
dexon-9c110d37d09d40235b140ca7197515d5c60052c4.tar.gz
dexon-9c110d37d09d40235b140ca7197515d5c60052c4.tar.bz2
dexon-9c110d37d09d40235b140ca7197515d5c60052c4.tar.lz
dexon-9c110d37d09d40235b140ca7197515d5c60052c4.tar.xz
dexon-9c110d37d09d40235b140ca7197515d5c60052c4.tar.zst
dexon-9c110d37d09d40235b140ca7197515d5c60052c4.zip
app: implement logic for prepare/verify correctly when chain number change (#118)
Diffstat (limited to 'core/genesis.go')
-rw-r--r--core/genesis.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/core/genesis.go b/core/genesis.go
index 62d08933c..38216361f 100644
--- a/core/genesis.go
+++ b/core/genesis.go
@@ -170,6 +170,8 @@ func SetupGenesisBlock(db ethdb.Database, genesis *Genesis) (*params.ChainConfig
return SetupGenesisBlockWithOverride(db, genesis, nil)
}
func SetupGenesisBlockWithOverride(db ethdb.Database, genesis *Genesis, constantinopleOverride *big.Int) (*params.ChainConfig, common.Hash, error) {
+ rawdb.WriteLastRoundNumber(db, 0)
+
if genesis != nil && genesis.Config == nil {
return params.AllEthashProtocolChanges, common.Hash{}, errGenesisNoConfig
}