Skip to content

Commit

Permalink
consensus/ethash: ensure uncle accounts are included in block witness (
Browse files Browse the repository at this point in the history
  • Loading branch information
jwasinger authored Dec 2, 2021
1 parent 86bdc3f commit fa753db
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions consensus/ethash/consensus.go
Original file line number Diff line number Diff line change
Expand Up @@ -662,6 +662,8 @@ func accumulateRewards(config *params.ChainConfig, state *state.StateDB, header
r.Sub(r, header.Number)
r.Mul(r, blockReward)
r.Div(r, big8)
uncleCoinbase := utils.GetTreeKeyBalance(uncle.Coinbase.Bytes())
state.Witness().TouchAddress(uncleCoinbase, state.GetBalance(uncle.Coinbase).Bytes())
state.AddBalance(uncle.Coinbase, r)

r.Div(blockReward, big32)
Expand Down

0 comments on commit fa753db

Please sign in to comment.