Skip to content

Commit

Permalink
chore(rpc): relax FullNodeComponents trait bound on OpEthApi to `…
Browse files Browse the repository at this point in the history
…RpcNodeCore` (#12142)
  • Loading branch information
emhane authored Oct 28, 2024
1 parent 06d73ee commit 0733da9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
2 changes: 1 addition & 1 deletion crates/optimism/rpc/src/eth/call.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ where

impl<N> Call for OpEthApi<N>
where
N: RpcNodeCore,
Self: LoadState<Evm: ConfigureEvm<Header = Header>> + SpawnBlocking,
Self::Error: From<OpEthApiError>,
N: RpcNodeCore,
{
#[inline]
fn call_gas_limit(&self) -> u64 {
Expand Down
11 changes: 5 additions & 6 deletions crates/optimism/rpc/src/eth/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ use op_alloy_network::Optimism;
use reth_chainspec::{EthChainSpec, EthereumHardforks};
use reth_evm::ConfigureEvm;
use reth_network_api::NetworkInfo;
use reth_node_api::{FullNodeComponents, NodeTypes};
use reth_node_builder::EthApiBuilderCtx;
use reth_primitives::Header;
use reth_provider::{
Expand Down Expand Up @@ -177,7 +176,7 @@ where
impl<N> SpawnBlocking for OpEthApi<N>
where
Self: Send + Sync + Clone + 'static,
N: FullNodeComponents,
N: RpcNodeCore,
{
#[inline]
fn io_task_spawner(&self) -> impl TaskSpawner {
Expand Down Expand Up @@ -237,7 +236,7 @@ where
impl<N> EthState for OpEthApi<N>
where
Self: LoadState + SpawnBlocking,
N: FullNodeComponents,
N: RpcNodeCore,
{
#[inline]
fn max_proof_window(&self) -> u64 {
Expand All @@ -248,7 +247,7 @@ where
impl<N> EthFees for OpEthApi<N>
where
Self: LoadFee,
N: FullNodeComponents,
N: RpcNodeCore,
{
}

Expand All @@ -261,10 +260,10 @@ where

impl<N> AddDevSigners for OpEthApi<N>
where
N: FullNodeComponents<Types: NodeTypes<ChainSpec: EthereumHardforks>>,
N: RpcNodeCore,
{
fn with_dev_accounts(&self) {
*self.signers().write() = DevSigner::random_signers(20)
*self.inner.signers().write() = DevSigner::random_signers(20)
}
}

Expand Down

0 comments on commit 0733da9

Please sign in to comment.