Skip to content

Commit

Permalink
touchups
Browse files Browse the repository at this point in the history
  • Loading branch information
mattsse committed Nov 2, 2024
1 parent a6bcd56 commit 6adf224
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
5 changes: 2 additions & 3 deletions crates/engine/util/src/reorg.rs
Original file line number Diff line number Diff line change
Expand Up @@ -259,8 +259,6 @@ where
Evm: ConfigureEvm<Header = Header>,
Spec: EthereumHardforks,
{
let chain_spec = Arc::new(payload_validator.chain_spec());

// Ensure next payload is valid.
let next_block = payload_validator
.ensure_well_formed_payload(next_payload, next_sidecar)
Expand Down Expand Up @@ -304,7 +302,8 @@ where
let mut evm = evm_config.evm_with_env(&mut state, env);

// apply eip-4788 pre block contract call
let mut system_caller = SystemCaller::new(evm_config.clone(), chain_spec.clone());
let mut system_caller =
SystemCaller::new(evm_config.clone(), payload_validator.chain_spec().clone());

system_caller.apply_beacon_root_contract_call(
reorg_target.timestamp,
Expand Down
3 changes: 1 addition & 2 deletions crates/evm/src/system_calls/mod.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//! System contract call functions.
use crate::ConfigureEvm;
use alloc::{boxed::Box, vec};
use alloc::{boxed::Box, sync::Arc, vec};
use alloy_eips::eip7685::Requests;
use alloy_primitives::Bytes;
use core::fmt::Display;
Expand All @@ -10,7 +10,6 @@ use reth_execution_errors::BlockExecutionError;
use reth_primitives::{Block, Header};
use revm::{Database, DatabaseCommit, Evm};
use revm_primitives::{BlockEnv, CfgEnvWithHandlerCfg, EnvWithHandlerCfg, ResultAndState, B256};
use std::sync::Arc;

mod eip2935;
mod eip4788;
Expand Down
2 changes: 1 addition & 1 deletion crates/payload/validator/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ impl<ChainSpec> ExecutionPayloadValidator<ChainSpec> {

/// Returns the chain spec used by the validator.
#[inline]
pub fn chain_spec(&self) -> &ChainSpec {
pub fn chain_spec(&self) -> &Arc<ChainSpec> {
&self.chain_spec
}
}
Expand Down

0 comments on commit 6adf224

Please sign in to comment.