Skip to content

Commit

Permalink
Update revm_spec to use forks_iter() for hardfork iteration
Browse files Browse the repository at this point in the history
Replaced .iter() with .forks_iter() in revm_spec as recommended to improve clarity when iterating through hardfork conditions.
  • Loading branch information
cypherpepe authored Oct 28, 2024
1 parent efae205 commit e0a3835
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions crates/node/src/evm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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(
|| {
Expand All @@ -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 {
Expand Down

0 comments on commit e0a3835

Please sign in to comment.