mirror of
https://github.com/paradigmxyz/reth.git
synced 2026-01-26 23:58:46 -05:00
chore(rpc): remove redundant LoadTransaction::cache (#12148)
This commit is contained in:
@@ -12,7 +12,7 @@ use reth_rpc_eth_api::{
|
||||
helpers::{EthSigner, EthTransactions, LoadTransaction, SpawnBlocking},
|
||||
FromEthApiError, FullEthApiTypes, RpcNodeCore, TransactionCompat,
|
||||
};
|
||||
use reth_rpc_eth_types::{utils::recover_raw_transaction, EthStateCache};
|
||||
use reth_rpc_eth_types::utils::recover_raw_transaction;
|
||||
use reth_transaction_pool::{PoolTransaction, TransactionOrigin, TransactionPool};
|
||||
|
||||
use crate::{OpEthApi, SequencerClient};
|
||||
@@ -59,10 +59,6 @@ where
|
||||
Self: SpawnBlocking + FullEthApiTypes,
|
||||
N: RpcNodeCore<Provider: TransactionsProvider, Pool: TransactionPool>,
|
||||
{
|
||||
#[inline]
|
||||
fn cache(&self) -> &EthStateCache {
|
||||
self.inner.cache()
|
||||
}
|
||||
}
|
||||
|
||||
impl<N> OpEthApi<N>
|
||||
|
||||
@@ -15,14 +15,15 @@ use reth_primitives::{
|
||||
use reth_provider::{BlockNumReader, BlockReaderIdExt, ReceiptProvider, TransactionsProvider};
|
||||
use reth_rpc_eth_types::{
|
||||
utils::{binary_search, recover_raw_transaction},
|
||||
EthApiError, EthStateCache, SignError, TransactionSource,
|
||||
EthApiError, SignError, TransactionSource,
|
||||
};
|
||||
use reth_rpc_types_compat::transaction::{from_recovered, from_recovered_with_block_context};
|
||||
use reth_transaction_pool::{PoolTransaction, TransactionOrigin, TransactionPool};
|
||||
use std::sync::Arc;
|
||||
|
||||
use crate::{
|
||||
FromEthApiError, FullEthApiTypes, IntoEthApiError, RpcNodeCore, RpcReceipt, RpcTransaction,
|
||||
FromEthApiError, FullEthApiTypes, IntoEthApiError, RpcNodeCore, RpcNodeCoreExt, RpcReceipt,
|
||||
RpcTransaction,
|
||||
};
|
||||
|
||||
use super::{
|
||||
@@ -461,13 +462,10 @@ pub trait EthTransactions: LoadTransaction<Provider: BlockReaderIdExt> {
|
||||
/// Behaviour shared by several `eth_` RPC methods, not exclusive to `eth_` transactions RPC
|
||||
/// methods.
|
||||
pub trait LoadTransaction:
|
||||
SpawnBlocking + FullEthApiTypes + RpcNodeCore<Provider: TransactionsProvider, Pool: TransactionPool>
|
||||
SpawnBlocking
|
||||
+ FullEthApiTypes
|
||||
+ RpcNodeCoreExt<Provider: TransactionsProvider, Pool: TransactionPool>
|
||||
{
|
||||
/// Returns a handle for reading data from memory.
|
||||
///
|
||||
/// Data access in default (L1) trait method implementations.
|
||||
fn cache(&self) -> &EthStateCache;
|
||||
|
||||
/// Returns the transaction by hash.
|
||||
///
|
||||
/// Checks the pool and state.
|
||||
|
||||
@@ -5,7 +5,6 @@ use reth_rpc_eth_api::{
|
||||
helpers::{EthSigner, EthTransactions, LoadTransaction, SpawnBlocking},
|
||||
FullEthApiTypes, RpcNodeCore,
|
||||
};
|
||||
use reth_rpc_eth_types::EthStateCache;
|
||||
use reth_transaction_pool::TransactionPool;
|
||||
|
||||
use crate::EthApi;
|
||||
@@ -28,10 +27,6 @@ where
|
||||
+ FullEthApiTypes
|
||||
+ RpcNodeCore<Provider: TransactionsProvider, Pool: TransactionPool>,
|
||||
{
|
||||
#[inline]
|
||||
fn cache(&self) -> &EthStateCache {
|
||||
self.inner.cache()
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
|
||||
Reference in New Issue
Block a user