mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-06-19 21:31:37 +00:00
minor fix for chainHeadCh
This commit is contained in:
parent
dd0f27ebeb
commit
c9ad5cedb2
1 changed files with 1 additions and 1 deletions
|
|
@ -481,9 +481,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