diff options
author | Sonic <sonic@dexon.org> | 2019-01-08 13:10:02 +0800 |
---|---|---|
committer | Wei-Ning Huang <w@dexon.org> | 2019-04-09 21:32:56 +0800 |
commit | 85d3ca56cbca94c9f78e59fc19791bed9be5b11e (patch) | |
tree | 33eed3cedf40efe309da282bfdee870fafe01c94 | |
parent | 9c110d37d09d40235b140ca7197515d5c60052c4 (diff) | |
download | dexon-85d3ca56cbca94c9f78e59fc19791bed9be5b11e.tar.gz dexon-85d3ca56cbca94c9f78e59fc19791bed9be5b11e.tar.zst dexon-85d3ca56cbca94c9f78e59fc19791bed9be5b11e.zip |
core: fix corner case when initializing round height (#134)
-rw-r--r-- | core/blockchain.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/core/blockchain.go b/core/blockchain.go index e83702065..089f1c2fa 100644 --- a/core/blockchain.go +++ b/core/blockchain.go @@ -251,7 +251,7 @@ func NewBlockChain(db ethdb.Database, cacheConfig *CacheConfig, chainConfig *par bc.storeRoundHeight(uint64(0), uint64(0)) } else { prevh := gov.GetRoundHeight(r - 1) - if prevh == uint64(0) { + if prevh == uint64(0) && (r-1) != uint64(0) { // Previous round height should be already snapshoted // in governance state at this moment. panic("can not init previous round height map") |