Skip to content

Commit

Permalink
refactor: load_account -> warm_preloaded_addresses (#1584)
Browse files Browse the repository at this point in the history
  • Loading branch information
hack3r-0m authored Jul 10, 2024
1 parent 7f8e31a commit 313146f
Showing 1 changed file with 11 additions and 10 deletions.
21 changes: 11 additions & 10 deletions crates/revm/src/handler/mainnet/pre_execution.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,21 +31,22 @@ pub fn load_accounts<SPEC: Spec, EXT, DB: Database>(
// 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.
Expand Down

0 comments on commit 313146f

Please sign in to comment.