Skip to content

Commit fa753db

Browse files
authored
consensus/ethash: ensure uncle accounts are included in block witness (#40)
1 parent 86bdc3f commit fa753db

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

consensus/ethash/consensus.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -662,6 +662,8 @@ func accumulateRewards(config *params.ChainConfig, state *state.StateDB, header
662662
r.Sub(r, header.Number)
663663
r.Mul(r, blockReward)
664664
r.Div(r, big8)
665+
uncleCoinbase := utils.GetTreeKeyBalance(uncle.Coinbase.Bytes())
666+
state.Witness().TouchAddress(uncleCoinbase, state.GetBalance(uncle.Coinbase).Bytes())
665667
state.AddBalance(uncle.Coinbase, r)
666668

667669
r.Div(blockReward, big32)

0 commit comments

Comments
 (0)