reth_provider

Trait HeaderSyncGapProvider

Source
pub trait HeaderSyncGapProvider: Send + Sync {
    // Required method
    fn sync_gap(
        &self,
        tip: Receiver<B256>,
        highest_uninterrupted_block: BlockNumber,
    ) -> ProviderResult<HeaderSyncGap>;
}
Expand description

Client trait for determining the current headers sync gap.

Required Methods§

Source

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

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§

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

Source§

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

Source§

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

Implementors§