Skip to content

Commit 79d701f

Browse files
nerolationfselmo
authored andcommitted
fix self destruct in same transaction bug
1 parent a09196e commit 79d701f

File tree

1 file changed

+5
-0
lines changed
  • src/ethereum/forks/amsterdam

1 file changed

+5
-0
lines changed

src/ethereum/forks/amsterdam/fork.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@
3535
from .block_access_lists.tracker import (
3636
set_block_access_index,
3737
track_balance_change,
38+
track_code_change,
39+
track_nonce_change,
3840
)
3941
from .blocks import Block, Header, Log, Receipt, Withdrawal, encode_receipt
4042
from .bloom import logs_bloom
@@ -996,6 +998,9 @@ def process_transaction(
996998
destroy_account(block_env.state, block_env.coinbase)
997999

9981000
for address in tx_output.accounts_to_delete:
1001+
# Track final state before destruction
1002+
track_code_change(block_env.state.change_tracker, address, Bytes())
1003+
track_nonce_change(block_env.state.change_tracker, address, Uint(0))
9991004
destroy_account(block_env.state, address)
10001005

10011006
block_output.block_gas_used += tx_gas_used_after_refund

0 commit comments

Comments
 (0)