mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-15 17:30:44 +00:00
bals: touch address on delegation
This commit is contained in:
parent
bde29cee44
commit
7d15fa0075
1 changed files with 8 additions and 0 deletions
|
|
@ -766,6 +766,14 @@ func (st *stateTransition) execute() (*ExecutionResult, error) {
|
||||||
// performing the resolution and warming.
|
// performing the resolution and warming.
|
||||||
if addr, ok := types.ParseDelegation(st.state.GetCode(*msg.To)); ok {
|
if addr, ok := types.ParseDelegation(st.state.GetCode(*msg.To)); ok {
|
||||||
st.state.AddAddressToAccessList(addr)
|
st.state.AddAddressToAccessList(addr)
|
||||||
|
// Resolving the delegation accesses the target account, which the
|
||||||
|
// EIP-7928 block access list must record even when the transaction
|
||||||
|
// later runs out of gas at the top-frame charge (the cold-access
|
||||||
|
// charge is levied for this access). Reading it here registers the
|
||||||
|
// access; AddAddressToAccessList alone does not.
|
||||||
|
if rules.IsAmsterdam {
|
||||||
|
st.state.GetCode(addr)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
// EIP-2780: charge the transaction's top-level recipient costs. If the
|
// EIP-2780: charge the transaction's top-level recipient costs. If the
|
||||||
// budget cannot cover the charge, the top frame halts out of gas.
|
// budget cannot cover the charge, the top frame halts out of gas.
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue