From b4bb2e15d4b779f3d06eb7f58d848f174926c129 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(-) (limited to 'dex') 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 v1.2.3