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§
Required Methods§
Sourcefn sync_gap(
&self,
tip: Receiver<B256>,
highest_uninterrupted_block: BlockNumber,
) -> ProviderResult<HeaderSyncGap<Self::Header>>
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.