diff options
author | Sonic <sonic@dexon.org> | 2019-01-08 13:10:02 +0800 |
---|---|---|
committer | Wei-Ning Huang <w@dexon.org> | 2019-01-14 15:26:26 +0800 |
commit | c6d4e6b777a435c5d0d8c174241c1db15f9992f4 (patch) | |
tree | 5e842eb2e1086ece09cec6e7f76bafc96b64b013 | |
parent | c90c2f0f036307824f1e64e8f0fba012fa1cc927 (diff) | |
download | dexon-c6d4e6b777a435c5d0d8c174241c1db15f9992f4.tar dexon-c6d4e6b777a435c5d0d8c174241c1db15f9992f4.tar.gz dexon-c6d4e6b777a435c5d0d8c174241c1db15f9992f4.tar.bz2 dexon-c6d4e6b777a435c5d0d8c174241c1db15f9992f4.tar.lz dexon-c6d4e6b777a435c5d0d8c174241c1db15f9992f4.tar.xz dexon-c6d4e6b777a435c5d0d8c174241c1db15f9992f4.tar.zst dexon-c6d4e6b777a435c5d0d8c174241c1db15f9992f4.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 3c00109ea..4ddc2aadb 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") |