Struct reth_prune_types::ReceiptsLogPruneConfig
source · pub struct ReceiptsLogPruneConfig(pub BTreeMap<Address, PruneMode>);
Expand description
Configuration for pruning receipts not associated with logs emitted by the specified contracts.
Tuple Fields§
§0: BTreeMap<Address, PruneMode>
Implementations§
source§impl ReceiptsLogPruneConfig
impl ReceiptsLogPruneConfig
sourcepub fn group_by_block(
&self,
tip: BlockNumber,
pruned_block: Option<BlockNumber>,
) -> Result<BTreeMap<BlockNumber, Vec<&Address>>, PruneSegmentError>
pub fn group_by_block( &self, tip: BlockNumber, pruned_block: Option<BlockNumber>, ) -> Result<BTreeMap<BlockNumber, Vec<&Address>>, PruneSegmentError>
Given the tip
block number, consolidates the structure so it can easily be queried for
filtering across a range of blocks.
Example:
{ addrA: Before(872), addrB: Before(500), addrC: Distance(128) }
for tip: 1000
, gets transformed to a map such as:
{ 500: [addrB], 872: [addrA, addrC] }
The [BlockNumber
] key of the new map should be viewed as PruneMode::Before(block)
, which
makes the previous result equivalent to
{ Before(500): [addrB], Before(872): [addrA, addrC] }
sourcepub fn lowest_block_with_distance(
&self,
tip: BlockNumber,
pruned_block: Option<BlockNumber>,
) -> Result<Option<BlockNumber>, PruneSegmentError>
pub fn lowest_block_with_distance( &self, tip: BlockNumber, pruned_block: Option<BlockNumber>, ) -> Result<Option<BlockNumber>, PruneSegmentError>
Returns the lowest block where we start filtering logs which use PruneMode::Distance(_)
.
Trait Implementations§
source§impl Clone for ReceiptsLogPruneConfig
impl Clone for ReceiptsLogPruneConfig
source§fn clone(&self) -> ReceiptsLogPruneConfig
fn clone(&self) -> ReceiptsLogPruneConfig
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for ReceiptsLogPruneConfig
impl Debug for ReceiptsLogPruneConfig
source§impl Default for ReceiptsLogPruneConfig
impl Default for ReceiptsLogPruneConfig
source§fn default() -> ReceiptsLogPruneConfig
fn default() -> ReceiptsLogPruneConfig
source§impl<'de> Deserialize<'de> for ReceiptsLogPruneConfig
impl<'de> Deserialize<'de> for ReceiptsLogPruneConfig
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
source§impl PartialEq for ReceiptsLogPruneConfig
impl PartialEq for ReceiptsLogPruneConfig
source§impl Serialize for ReceiptsLogPruneConfig
impl Serialize for ReceiptsLogPruneConfig
impl Eq for ReceiptsLogPruneConfig
impl StructuralPartialEq for ReceiptsLogPruneConfig
Auto Trait Implementations§
impl Freeze for ReceiptsLogPruneConfig
impl RefUnwindSafe for ReceiptsLogPruneConfig
impl Send for ReceiptsLogPruneConfig
impl Sync for ReceiptsLogPruneConfig
impl Unpin for ReceiptsLogPruneConfig
impl UnwindSafe for ReceiptsLogPruneConfig
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
§impl<T> WithSubscriber for T
impl<T> WithSubscriber for T
§fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where
S: Into<Dispatch>,
§fn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Layout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...)
attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 24 bytes