consensus/ethash: ensure uncle accounts are included in block witness (#40)

This commit is contained in:
jwasinger
2021-12-01 22:39:51 -10:00
committed by GitHub
parent 86bdc3fb39
commit fa753db9e8

View File

@ -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)