Skip to content

Commit

Permalink
Merge pull request ethereum#202 from ngtuna/chainHeadCh
Browse files Browse the repository at this point in the history
minor fix for chainHeadCh
  • Loading branch information
ngtuna authored Oct 5, 2018
2 parents 601e22c + a8aead3 commit 791769c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion miner/worker.go
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down

0 comments on commit 791769c

Please sign in to comment.