Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 2 additions & 6 deletions crates/rpc/rpc-eth-api/src/helpers/config.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//! Loads chain configuration.

use alloy_consensus::{BlockHeader, Header};
use alloy_consensus::Header;
use alloy_eips::eip7910::{EthConfig, EthForkConfig, SystemContract};
use alloy_evm::precompiles::Precompile;
use alloy_primitives::Address;
Expand All @@ -14,6 +14,7 @@ use reth_rpc_eth_types::EthApiError;
use reth_storage_api::BlockReaderIdExt;
use std::collections::BTreeMap;

/// RPC endpoint support for [EIP-7910](https://eips.ethereum.org/EIPS/eip-7910)
#[cfg_attr(not(feature = "client"), rpc(server, namespace = "eth"))]
#[cfg_attr(feature = "client", rpc(server, client, namespace = "eth"))]
pub trait EthConfigApi {
Expand Down Expand Up @@ -88,11 +89,6 @@ where
.ok_or_else(|| ProviderError::BestBlockNotFound)?
.into_header();

// Short-circuit if Cancun is not active.
if !chain_spec.is_cancun_active_at_timestamp(latest.timestamp()) {
return Err(RethError::msg("cancun has not been activated"))
}

let current_precompiles = evm_to_precompiles_map(
self.evm_config.evm_for_block(EmptyDB::default(), &latest).map_err(RethError::other)?,
);
Expand Down