From e0a38358a5042d96a616cc1858002743f994f3ed Mon Sep 17 00:00:00 2001 From: Cypher Pepe <125112044+cypherpepe@users.noreply.github.com> Date: Mon, 28 Oct 2024 10:46:43 +0300 Subject: [PATCH] Update revm_spec to use forks_iter() for hardfork iteration Replaced .iter() with .forks_iter() in revm_spec as recommended to improve clarity when iterating through hardfork conditions. --- crates/node/src/evm.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/node/src/evm.rs b/crates/node/src/evm.rs index 81c64f2..03eb387 100644 --- a/crates/node/src/evm.rs +++ b/crates/node/src/evm.rs @@ -253,8 +253,7 @@ impl ConfigureEvm for OdysseyEvmConfig { /// Determine the revm spec ID from the current block and reth chainspec. fn revm_spec(chain_spec: &ChainSpec, block: &Head) -> reth_revm::primitives::SpecId { chain_spec - .hardforks - .iter() + .forks_iter() .find(|(_, condition)| condition.active_at_head(block)) .map_or_else( || { @@ -267,6 +266,7 @@ fn revm_spec(chain_spec: &ChainSpec, block: &Head) -> reth_revm::primitives::Spe ) } + /// Map hardfork to the corresponding `SpecId`. fn map_hardfork_to_spec_id(fork: &EthereumHardfork) -> reth_revm::primitives::SpecId { match fork {