7070from .state_tracker import (
7171 BlockState ,
7272 TransactionState ,
73- account_exists_and_is_empty ,
7473 create_ether ,
7574 destroy_account ,
7675 extract_block_diff ,
@@ -1054,19 +1053,10 @@ def process_transaction(
10541053 transaction_fee = tx_gas_used * priority_fee_per_gas
10551054
10561055 # refund gas
1057- sender_balance_after_refund = get_account (tx_state , sender ).balance + U256 (
1058- gas_refund_amount
1059- )
1060- set_account_balance (tx_state , sender , sender_balance_after_refund )
1056+ create_ether (tx_state , sender , U256 (gas_refund_amount ))
10611057
10621058 # transfer miner fees
1063- coinbase_balance_after_mining_fee = get_account (
1064- tx_state , block_env .coinbase
1065- ).balance + U256 (transaction_fee )
1066-
1067- set_account_balance (
1068- tx_state , block_env .coinbase , coinbase_balance_after_mining_fee
1069- )
1059+ create_ether (tx_state , block_env .coinbase , U256 (transaction_fee ))
10701060
10711061 # EIP-7708: Emit burn logs for balances held by accounts marked for
10721062 # deletion AFTER miner fee transfer.
@@ -1088,11 +1078,6 @@ def process_transaction(
10881078
10891079 all_logs = tx_output .logs + tuple (finalization_logs )
10901080
1091- if coinbase_balance_after_mining_fee == 0 and account_exists_and_is_empty (
1092- tx_state , block_env .coinbase
1093- ):
1094- destroy_account (tx_state , block_env .coinbase )
1095-
10961081 block_output .cumulative_gas_used += tx_gas_used
10971082 block_output .block_gas_used += block_gas_used_in_tx
10981083 block_output .blob_gas_used += tx_blob_gas_used
0 commit comments