diff options
author | Mark <markya0616@gmail.com> | 2018-06-05 18:10:09 +0800 |
---|---|---|
committer | Felix Lange <fjl@users.noreply.github.com> | 2018-06-05 18:10:09 +0800 |
commit | 0029a869f04e9beb6741e591ebde07327458e64f (patch) | |
tree | 9486bc8db2564608ae76975039d59f925fd66fcb /miner | |
parent | 400332b99d4eacb6aa509339fa39460b68f76ee7 (diff) | |
download | go-tangerine-0029a869f04e9beb6741e591ebde07327458e64f.tar go-tangerine-0029a869f04e9beb6741e591ebde07327458e64f.tar.gz go-tangerine-0029a869f04e9beb6741e591ebde07327458e64f.tar.bz2 go-tangerine-0029a869f04e9beb6741e591ebde07327458e64f.tar.lz go-tangerine-0029a869f04e9beb6741e591ebde07327458e64f.tar.xz go-tangerine-0029a869f04e9beb6741e591ebde07327458e64f.tar.zst go-tangerine-0029a869f04e9beb6741e591ebde07327458e64f.zip |
miner: not call commitNewWork if it's a side block (#16751)
Diffstat (limited to 'miner')
-rw-r--r-- | miner/worker.go | 10 |
1 files changed, 0 insertions, 10 deletions
diff --git a/miner/worker.go b/miner/worker.go index 640e9032e..4913ba22e 100644 --- a/miner/worker.go +++ b/miner/worker.go @@ -297,7 +297,6 @@ func (self *worker) update() { func (self *worker) wait() { for { - mustCommitNewWork := true for result := range self.recv { atomic.AddInt32(&self.atWork, -1) @@ -322,11 +321,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 ( @@ -341,10 +335,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() - } } } } |