chore(rpc): remove redundant EthBlocks::provider (#12109)

This commit is contained in:
Emilia Hane
2024-10-27 17:21:34 +08:00
committed by GitHub
parent 768404c59e
commit 131cc5175e
3 changed files with 21 additions and 36 deletions

View File

@ -4,13 +4,13 @@ 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, NodeTypes};
use reth_node_api::FullNodeComponents;
use reth_optimism_chainspec::OpChainSpec;
use reth_primitives::TransactionMeta;
use reth_provider::HeaderProvider;
use reth_rpc_eth_api::{
helpers::{EthBlocks, LoadBlock, LoadPendingBlock, LoadReceipt, SpawnBlocking},
RpcReceipt,
RpcNodeCore, RpcReceipt,
};
use reth_rpc_eth_types::EthStateCache;
@ -22,13 +22,8 @@ where
Error = OpEthApiError,
NetworkTypes: Network<ReceiptResponse = OpTransactionReceipt>,
>,
N: FullNodeComponents<Types: NodeTypes<ChainSpec = OpChainSpec>>,
N: RpcNodeCore<Provider: ChainSpecProvider<ChainSpec = OpChainSpec> + HeaderProvider>,
{
#[inline]
fn provider(&self) -> impl HeaderProvider {
self.inner.provider()
}
async fn block_receipts(
&self,
block_id: BlockId,