From fa753db9e8aa970eb10694f56293123afd106619 Mon Sep 17 00:00:00 2001 From: jwasinger Date: Wed, 1 Dec 2021 22:39:51 -1000 Subject: [PATCH] consensus/ethash: ensure uncle accounts are included in block witness (#40) --- consensus/ethash/consensus.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/consensus/ethash/consensus.go b/consensus/ethash/consensus.go index 8dd95be64c89..54726c589d86 100644 --- a/consensus/ethash/consensus.go +++ b/consensus/ethash/consensus.go @@ -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)