From a8aead3957503c9ad13063ef1d869d3d3a5f3918 Mon Sep 17 00:00:00 2001 From: Tuna Date: Fri, 5 Oct 2018 10:23:42 +0700 Subject: [PATCH] minor fix for chainHeadCh --- miner/worker.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/miner/worker.go b/miner/worker.go index c3bdd0d93b..67af1a8ce7 100644 --- a/miner/worker.go +++ b/miner/worker.go @@ -482,9 +482,9 @@ func (self *worker) commitNewWork() { L: select { case newBlock := <-self.chainHeadCh: + self.chainHeadCh <- newBlock if newBlock.Block.NumberU64() > parent.NumberU64() { log.Info("New block has came already. Skip this turn", "new block", newBlock.Block.NumberU64(), "current block", parent.NumberU64()) - self.chainHeadCh <- newBlock return } case <-time.After(time.Duration(gap) * time.Second):