Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 0 additions & 10 deletions miner/worker.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand All @@ -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 (
Expand All @@ -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()
}
}
}
}
Expand Down