diff options
author | bojie <bojie@dexon.org> | 2019-01-07 15:40:56 +0800 |
---|---|---|
committer | Wei-Ning Huang <w@dexon.org> | 2019-04-09 21:32:56 +0800 |
commit | 9c110d37d09d40235b140ca7197515d5c60052c4 (patch) | |
tree | c88508bbb7ccbd430268c5bb44da2226e83b3b27 /core/genesis.go | |
parent | 3e405c7fdc936d3cdb516273105efc233144965c (diff) | |
download | dexon-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.go | 2 |
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 } |