From a3977690641f136dcf2dbc183f77de3b3cdcca99 Mon Sep 17 00:00:00 2001 From: Jimmy Hu Date: Sat, 30 Mar 2019 00:38:41 +0800 Subject: dex: fix a panic (#317) --- dex/blockproposer.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) -- cgit