Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(rpc): relax FullNodeComponents trait bound on OpEthApi to RpcNodeCore #12142

Merged
merged 1 commit into from
Oct 28, 2024
Merged
Show file tree
Hide file tree
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
3 changes: 1 addition & 2 deletions crates/optimism/rpc/src/eth/block.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ use alloy_rpc_types::BlockId;
use op_alloy_network::Network;
use op_alloy_rpc_types::OpTransactionReceipt;
use reth_chainspec::ChainSpecProvider;
use reth_node_api::FullNodeComponents;
use reth_optimism_chainspec::OpChainSpec;
use reth_primitives::TransactionMeta;
use reth_provider::HeaderProvider;
Expand Down Expand Up @@ -80,7 +79,7 @@ where
impl<N> LoadBlock for OpEthApi<N>
where
Self: LoadPendingBlock + SpawnBlocking,
N: FullNodeComponents,
N: RpcNodeCore,
{
#[inline]
fn cache(&self) -> &EthStateCache {
Expand Down
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 @@ -164,7 +163,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 @@ -224,7 +223,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 @@ -235,7 +234,7 @@ where
impl<N> EthFees for OpEthApi<N>
where
Self: LoadFee,
N: FullNodeComponents,
N: RpcNodeCore,
{
}

Expand All @@ -248,10 +247,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
Loading