Skip to content

Commit

Permalink
consensus/ethash: move accumulation of coinbase witness before coinba…
Browse files Browse the repository at this point in the history
…se account is credited (ethereum#41)
  • Loading branch information
jwasinger authored Dec 2, 2021
1 parent fa753db commit 5bac5b3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion consensus/ethash/consensus.go
Original file line number Diff line number Diff line change
Expand Up @@ -669,7 +669,7 @@ func accumulateRewards(config *params.ChainConfig, state *state.StateDB, header
r.Div(blockReward, big32)
reward.Add(reward, r)
}
state.AddBalance(header.Coinbase, reward)
coinbase := utils.GetTreeKeyBalance(header.Coinbase.Bytes())
state.Witness().TouchAddress(coinbase, state.GetBalance(header.Coinbase).Bytes())
state.AddBalance(header.Coinbase, reward)
}

0 comments on commit 5bac5b3

Please sign in to comment.