From faf7fa052cb899db7dc37f8d3f22157d499328e1 Mon Sep 17 00:00:00 2001 From: Guillaume Ballet <3272758+gballet@users.noreply.github.com> Date: Fri, 4 Aug 2023 16:57:57 +0200 Subject: [PATCH] add withdrawals to witness --- consensus/beacon/consensus.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/consensus/beacon/consensus.go b/consensus/beacon/consensus.go index 1ad4358cff..d8a29f42fe 100644 --- a/consensus/beacon/consensus.go +++ b/consensus/beacon/consensus.go @@ -352,6 +352,9 @@ func (beacon *Beacon) Finalize(chain consensus.ChainHeaderReader, header *types. amount := new(big.Int).SetUint64(w.Amount) amount = amount.Mul(amount, big.NewInt(params.GWei)) state.AddBalance(w.Address, amount) + + // The returned gas is not charged + state.Witness().TouchAddressOnWriteAndComputeGas(w.Address[:]) } // No block reward which is issued by consensus layer instead. }