chore: remove unused WithdrawalsProvider::latest_withdrawal (#13671)

This commit is contained in:
joshieDo
2025-01-06 16:15:09 +00:00
committed by GitHub
parent 873009fd68
commit bd345378b6
12 changed files with 15 additions and 374 deletions

View File

@ -9,10 +9,7 @@ use crate::{
TransactionVariant, TransactionsProvider, WithdrawalsProvider,
};
use alloy_consensus::transaction::TransactionMeta;
use alloy_eips::{
eip4895::{Withdrawal, Withdrawals},
BlockHashOrNumber, BlockId, BlockNumberOrTag,
};
use alloy_eips::{eip4895::Withdrawals, BlockHashOrNumber, BlockId, BlockNumberOrTag};
use alloy_primitives::{
map::{B256HashMap, HashMap},
Address, BlockHash, BlockNumber, Bytes, StorageKey, StorageValue, TxHash, TxNumber, B256, U256,
@ -543,9 +540,6 @@ impl<C: Send + Sync, N: NodePrimitives> WithdrawalsProvider for NoopProvider<C,
) -> ProviderResult<Option<Withdrawals>> {
Ok(None)
}
fn latest_withdrawal(&self) -> ProviderResult<Option<Withdrawal>> {
Ok(None)
}
}
impl<C: Send + Sync, N: NodePrimitives> OmmersProvider for NoopProvider<C, N> {

View File

@ -1,10 +1,7 @@
use alloy_eips::{
eip4895::{Withdrawal, Withdrawals},
BlockHashOrNumber,
};
use alloy_eips::{eip4895::Withdrawals, BlockHashOrNumber};
use reth_storage_errors::provider::ProviderResult;
/// Client trait for fetching [Withdrawal] related data.
/// Client trait for fetching [`alloy_eips::eip4895::Withdrawal`] related data.
#[auto_impl::auto_impl(&, Arc)]
pub trait WithdrawalsProvider: Send + Sync {
/// Get withdrawals by block id.
@ -13,7 +10,4 @@ pub trait WithdrawalsProvider: Send + Sync {
id: BlockHashOrNumber,
timestamp: u64,
) -> ProviderResult<Option<Withdrawals>>;
/// Get latest withdrawal from this block or earlier .
fn latest_withdrawal(&self) -> ProviderResult<Option<Withdrawal>>;
}