mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-18 18:02:24 +00:00
miner: not call commitNewWork if it's a side block
This commit is contained in:
parent
6cf0ab38bd
commit
950073646e
1 changed files with 0 additions and 10 deletions
|
|
@ -290,7 +290,6 @@ func (self *worker) update() {
|
|||
|
||||
func (self *worker) wait() {
|
||||
for {
|
||||
mustCommitNewWork := true
|
||||
for result := range self.recv {
|
||||
atomic.AddInt32(&self.atWork, -1)
|
||||
|
||||
|
|
@ -315,11 +314,6 @@ func (self *worker) wait() {
|
|||
log.Error("Failed writing block to chain", "err", err)
|
||||
continue
|
||||
}
|
||||
// check if canon block and write transactions
|
||||
if stat == core.CanonStatTy {
|
||||
// implicit by posting ChainHeadEvent
|
||||
mustCommitNewWork = false
|
||||
}
|
||||
// Broadcast the block and announce chain insertion event
|
||||
self.mux.Post(core.NewMinedBlockEvent{Block: block})
|
||||
var (
|
||||
|
|
@ -334,10 +328,6 @@ func (self *worker) wait() {
|
|||
|
||||
// Insert the block into the set of pending ones to wait for confirmations
|
||||
self.unconfirmed.Insert(block.NumberU64(), block.Hash())
|
||||
|
||||
if mustCommitNewWork {
|
||||
self.commitNewWork()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue