|
|
@ -416,10 +416,12 @@ func (self *worker) commitNewWork() { |
|
|
|
delete(self.possibleUncles, hash) |
|
|
|
delete(self.possibleUncles, hash) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// commit state root after all state transitions.
|
|
|
|
if atomic.LoadInt32(&self.mining) == 1 { |
|
|
|
core.AccumulateRewards(self.current.state, header, uncles) |
|
|
|
// commit state root after all state transitions.
|
|
|
|
current.state.Update() |
|
|
|
core.AccumulateRewards(self.current.state, header, uncles) |
|
|
|
header.Root = current.state.Root() |
|
|
|
current.state.Update() |
|
|
|
|
|
|
|
header.Root = current.state.Root() |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// create the new block whose nonce will be mined.
|
|
|
|
// create the new block whose nonce will be mined.
|
|
|
|
current.block = types.NewBlock(header, current.txs, uncles, current.receipts) |
|
|
|
current.block = types.NewBlock(header, current.txs, uncles, current.receipts) |
|
|
|