mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-19 10:22:23 +00:00
Merge pull request #202 from ngtuna/chainHeadCh
minor fix for chainHeadCh
This commit is contained in:
commit
791769ce29
1 changed files with 1 additions and 1 deletions
|
|
@ -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):
|
||||
|
|
|
|||
Loading…
Reference in a new issue