diff options
author | Sonic <sonic@dexon.org> | 2019-01-08 13:10:02 +0800 |
---|---|---|
committer | Wei-Ning Huang <w@byzantine-lab.io> | 2019-06-12 17:27:21 +0800 |
commit | ae6b80de810fbe3e1dc6a2b985cf949881ec24a9 (patch) | |
tree | e9fb9aa7067f675efd71f459296f0418ee5d9286 | |
parent | bc788bdf15656f8e867cf9a81769fb280b5bfb49 (diff) | |
download | go-tangerine-ae6b80de810fbe3e1dc6a2b985cf949881ec24a9.tar go-tangerine-ae6b80de810fbe3e1dc6a2b985cf949881ec24a9.tar.gz go-tangerine-ae6b80de810fbe3e1dc6a2b985cf949881ec24a9.tar.bz2 go-tangerine-ae6b80de810fbe3e1dc6a2b985cf949881ec24a9.tar.lz go-tangerine-ae6b80de810fbe3e1dc6a2b985cf949881ec24a9.tar.xz go-tangerine-ae6b80de810fbe3e1dc6a2b985cf949881ec24a9.tar.zst go-tangerine-ae6b80de810fbe3e1dc6a2b985cf949881ec24a9.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") |