mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-19 18:32:23 +00:00
minor fix for chainHeadCh
This commit is contained in:
parent
601e22c2fa
commit
a8aead3957
1 changed files with 1 additions and 1 deletions
|
|
@ -482,9 +482,9 @@ func (self *worker) commitNewWork() {
|
||||||
L:
|
L:
|
||||||
select {
|
select {
|
||||||
case newBlock := <-self.chainHeadCh:
|
case newBlock := <-self.chainHeadCh:
|
||||||
|
self.chainHeadCh <- newBlock
|
||||||
if newBlock.Block.NumberU64() > parent.NumberU64() {
|
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())
|
log.Info("New block has came already. Skip this turn", "new block", newBlock.Block.NumberU64(), "current block", parent.NumberU64())
|
||||||
self.chainHeadCh <- newBlock
|
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
case <-time.After(time.Duration(gap) * time.Second):
|
case <-time.After(time.Duration(gap) * time.Second):
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue