We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e349fac commit ac80ec5Copy full SHA for ac80ec5
miner/worker.go
@@ -416,10 +416,12 @@ func (self *worker) commitNewWork() {
416
delete(self.possibleUncles, hash)
417
}
418
419
- // commit state root after all state transitions.
420
- core.AccumulateRewards(self.current.state, header, uncles)
421
- current.state.Update()
422
- header.Root = current.state.Root()
+ if atomic.LoadInt32(&self.mining) == 1 {
+ // commit state root after all state transitions.
+ core.AccumulateRewards(self.current.state, header, uncles)
+ current.state.Update()
423
+ header.Root = current.state.Root()
424
+ }
425
426
// create the new block whose nonce will be mined.
427
current.block = types.NewBlock(header, current.txs, uncles, current.receipts)
0 commit comments