diff options
author | Sonic <sonic@dexon.org> | 2019-01-08 13:10:02 +0800 |
---|---|---|
committer | Wei-Ning Huang <w@dexon.org> | 2019-04-09 13:50:01 +0800 |
commit | a5f2866bd0d005064b57620c0e9c1bd2a3beaafd (patch) | |
tree | 731ab19a15b810b41f52ef6ea527e0cc2f203c3e | |
parent | 435d20d7930dcf9e400bb3c67cea604e7f9b8802 (diff) | |
download | dexon-a5f2866bd0d005064b57620c0e9c1bd2a3beaafd.tar dexon-a5f2866bd0d005064b57620c0e9c1bd2a3beaafd.tar.gz dexon-a5f2866bd0d005064b57620c0e9c1bd2a3beaafd.tar.bz2 dexon-a5f2866bd0d005064b57620c0e9c1bd2a3beaafd.tar.lz dexon-a5f2866bd0d005064b57620c0e9c1bd2a3beaafd.tar.xz dexon-a5f2866bd0d005064b57620c0e9c1bd2a3beaafd.tar.zst dexon-a5f2866bd0d005064b57620c0e9c1bd2a3beaafd.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") |