reth_provider

Trait HeaderSyncGapProvider

Source
pub trait HeaderSyncGapProvider: Send + Sync {
    type Header: Send + Sync;

    // Required method
    fn sync_gap(
        &self,
        tip: Receiver<B256>,
        highest_uninterrupted_block: BlockNumber,
    ) -> ProviderResult<HeaderSyncGap<Self::Header>>;
}
Expand description

Client trait for determining the current headers sync gap.

Required Associated Types§

Source

type Header: Send + Sync

The header type.

Required Methods§

Source

fn sync_gap( &self, tip: Receiver<B256>, highest_uninterrupted_block: BlockNumber, ) -> ProviderResult<HeaderSyncGap<Self::Header>>

Find a current sync gap for the headers depending on the last uninterrupted block number. Last uninterrupted block represents the block number before which there are no gaps. It’s up to the caller to ensure that last uninterrupted block is determined correctly.

Implementations on Foreign Types§

Source§

impl<'a, T: 'a + HeaderSyncGapProvider + ?Sized> HeaderSyncGapProvider for &'a T
where &'a T: Send + Sync,

Source§

type Header = <T as HeaderSyncGapProvider>::Header

Source§

fn sync_gap( &self, tip: Receiver<B256>, highest_uninterrupted_block: BlockNumber, ) -> ProviderResult<HeaderSyncGap<Self::Header>>

Source§

impl<T: HeaderSyncGapProvider + ?Sized> HeaderSyncGapProvider for Arc<T>
where Arc<T>: Send + Sync,

Source§

type Header = <T as HeaderSyncGapProvider>::Header

Source§

fn sync_gap( &self, tip: Receiver<B256>, highest_uninterrupted_block: BlockNumber, ) -> ProviderResult<HeaderSyncGap<Self::Header>>

Implementors§

Source§

impl<N: ProviderNodeTypes> HeaderSyncGapProvider for ProviderFactory<N>

Source§

type Header = <<N as NodeTypes>::Primitives as NodePrimitives>::BlockHeader

Source§

impl<TX: DbTx + 'static, N: NodeTypesForProvider> HeaderSyncGapProvider for DatabaseProvider<TX, N>

Source§

type Header = <<N as NodeTypes>::Primitives as NodePrimitives>::BlockHeader