diff --git a/crates/optimism/rpc/src/eth/mod.rs b/crates/optimism/rpc/src/eth/mod.rs index 8d6690b07e4b..12f83e0edf15 100644 --- a/crates/optimism/rpc/src/eth/mod.rs +++ b/crates/optimism/rpc/src/eth/mod.rs @@ -57,9 +57,10 @@ pub type EthApiNodeBackend = EthApiInner< /// /// This type implements the [`FullEthApi`](reth_rpc_eth_api::helpers::FullEthApi) by implemented /// all the `Eth` helper traits and prerequisite traits. +#[derive(Clone)] pub struct OpEthApi { inner: Arc>, - sequencer_client: parking_lot::RwLock>, + sequencer_client: Arc>>, } impl OpEthApi { @@ -84,20 +85,7 @@ impl OpEthApi { ctx.config.proof_permits, ); - Self { inner: Arc::new(inner), sequencer_client: parking_lot::RwLock::new(None) } - } -} - -impl Clone for OpEthApi -where - N: FullNodeComponents, - Self: Send + Sync, -{ - fn clone(&self) -> Self { - Self { - inner: self.inner.clone(), - sequencer_client: parking_lot::RwLock::new(self.sequencer_client.read().clone()), - } + Self { inner: Arc::new(inner), sequencer_client: Arc::new(parking_lot::RwLock::new(None)) } } }