From 313146f68e7dcf09149b3b853297acae5908a815 Mon Sep 17 00:00:00 2001 From: hack3r-0m <54898623+hack3r-0m@users.noreply.github.com> Date: Wed, 10 Jul 2024 21:33:34 +0530 Subject: [PATCH] refactor: load_account -> warm_preloaded_addresses (#1584) --- .../revm/src/handler/mainnet/pre_execution.rs | 21 ++++++++++--------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/crates/revm/src/handler/mainnet/pre_execution.rs b/crates/revm/src/handler/mainnet/pre_execution.rs index 75bb2d454f..216e4c9ab2 100644 --- a/crates/revm/src/handler/mainnet/pre_execution.rs +++ b/crates/revm/src/handler/mainnet/pre_execution.rs @@ -31,21 +31,22 @@ pub fn load_accounts( // load coinbase // EIP-3651: Warm COINBASE. Starts the `COINBASE` address warm if SPEC::enabled(SHANGHAI) { - context.evm.inner.journaled_state.initial_account_load( - context.evm.inner.env.block.coinbase, - [], - &mut context.evm.inner.db, - )?; + let coinbase = context.evm.inner.env.block.coinbase; + context + .evm + .journaled_state + .warm_preloaded_addresses + .insert(coinbase); } // Load blockhash storage address // EIP-2935: Serve historical block hashes from state if SPEC::enabled(PRAGUE) { - context.evm.inner.journaled_state.initial_account_load( - BLOCKHASH_STORAGE_ADDRESS, - [], - &mut context.evm.inner.db, - )?; + context + .evm + .journaled_state + .warm_preloaded_addresses + .insert(BLOCKHASH_STORAGE_ADDRESS); } // EIP-7702. Load bytecode to authorized accounts.