good morning!!!!

Skip to content
Snippets Groups Projects
Commit ac80ec59 authored by Jeffrey Wilcke's avatar Jeffrey Wilcke
Browse files

miner: update root only when mining

parent e349fac9
No related branches found
No related tags found
No related merge requests found
......@@ -416,10 +416,12 @@ func (self *worker) commitNewWork() {
delete(self.possibleUncles, hash)
}
if atomic.LoadInt32(&self.mining) == 1 {
// commit state root after all state transitions.
core.AccumulateRewards(self.current.state, header, uncles)
current.state.Update()
header.Root = current.state.Root()
}
// create the new block whose nonce will be mined.
current.block = types.NewBlock(header, current.txs, uncles, current.receipts)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment