add withdrawals to witness

This commit is contained in:
Guillaume Ballet 2023-08-04 16:57:57 +02:00
parent e2ac75246e
commit faf7fa052c

View file

@ -352,6 +352,9 @@ func (beacon *Beacon) Finalize(chain consensus.ChainHeaderReader, header *types.
amount := new(big.Int).SetUint64(w.Amount) amount := new(big.Int).SetUint64(w.Amount)
amount = amount.Mul(amount, big.NewInt(params.GWei)) amount = amount.Mul(amount, big.NewInt(params.GWei))
state.AddBalance(w.Address, amount) 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. // No block reward which is issued by consensus layer instead.
} }