aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJimmy Hu <jimmy.hu@dexon.org>2019-03-30 00:38:41 +0800
committerWei-Ning Huang <w@byzantine-lab.io>2019-06-15 22:09:55 +0800
commita3977690641f136dcf2dbc183f77de3b3cdcca99 (patch)
treebd3e60261077c7663be9dfd29ea8e9b76a2cfd0e
parentd1524ef0d32ecf12a92b1c0e18d6dd561798b1c8 (diff)
downloadgo-tangerine-a3977690641f136dcf2dbc183f77de3b3cdcca99.tar.gz
go-tangerine-a3977690641f136dcf2dbc183f77de3b3cdcca99.tar.zst
go-tangerine-a3977690641f136dcf2dbc183f77de3b3cdcca99.zip
dex: fix a panic (#317)
-rw-r--r--dex/blockproposer.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/dex/blockproposer.go b/dex/blockproposer.go
index 65f9f9e30..846e65617 100644
--- a/dex/blockproposer.go
+++ b/dex/blockproposer.go
@@ -199,9 +199,9 @@ ListenLoop:
select {
case ev := <-ch:
blocks := blocksToSync(coreHeight, ev.Block.NumberU64())
- b.watchCat.Feed(blocks[len(blocks)-1].Position)
if len(blocks) > 0 {
+ b.watchCat.Feed(blocks[len(blocks)-1].Position)
log.Debug("Filling compaction chain", "num", len(blocks),
"first", blocks[0].Finalization.Height,
"last", blocks[len(blocks)-1].Finalization.Height)