mirror of
https://github.com/paradigmxyz/reth.git
synced 2026-04-08 03:01:12 -04:00
chore: remove total difficulty from HeaderProvider (#19151)
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
use alloc::vec::Vec;
|
||||
use alloy_eips::BlockHashOrNumber;
|
||||
use alloy_primitives::{BlockHash, BlockNumber, U256};
|
||||
use alloy_primitives::{BlockHash, BlockNumber};
|
||||
use core::ops::RangeBounds;
|
||||
use reth_primitives_traits::{BlockHeader, SealedHeader};
|
||||
use reth_storage_errors::provider::ProviderResult;
|
||||
@@ -44,12 +44,6 @@ pub trait HeaderProvider: Send + Sync {
|
||||
}
|
||||
}
|
||||
|
||||
/// Get total difficulty by block hash.
|
||||
fn header_td(&self, hash: BlockHash) -> ProviderResult<Option<U256>>;
|
||||
|
||||
/// Get total difficulty by block number.
|
||||
fn header_td_by_number(&self, number: BlockNumber) -> ProviderResult<Option<U256>>;
|
||||
|
||||
/// Get headers in range of block numbers
|
||||
fn headers_range(
|
||||
&self,
|
||||
|
||||
@@ -15,7 +15,7 @@ use alloc::{boxed::Box, string::String, sync::Arc, vec::Vec};
|
||||
use alloy_consensus::transaction::TransactionMeta;
|
||||
use alloy_eips::{BlockHashOrNumber, BlockId, BlockNumberOrTag};
|
||||
use alloy_primitives::{
|
||||
Address, BlockHash, BlockNumber, Bytes, StorageKey, StorageValue, TxHash, TxNumber, B256, U256,
|
||||
Address, BlockHash, BlockNumber, Bytes, StorageKey, StorageValue, TxHash, TxNumber, B256,
|
||||
};
|
||||
use core::{
|
||||
fmt::Debug,
|
||||
@@ -356,14 +356,6 @@ impl<C: Send + Sync, N: NodePrimitives> HeaderProvider for NoopProvider<C, N> {
|
||||
Ok(None)
|
||||
}
|
||||
|
||||
fn header_td(&self, _hash: BlockHash) -> ProviderResult<Option<U256>> {
|
||||
Ok(None)
|
||||
}
|
||||
|
||||
fn header_td_by_number(&self, _number: BlockNumber) -> ProviderResult<Option<U256>> {
|
||||
Ok(None)
|
||||
}
|
||||
|
||||
fn headers_range(
|
||||
&self,
|
||||
_range: impl RangeBounds<BlockNumber>,
|
||||
|
||||
Reference in New Issue
Block a user