Trait HeaderSyncGapProvider
pub trait HeaderSyncGapProvider: Send + Sync {
type Header: Send + Sync;
// Required method
fn sync_gap(
&self,
tip: Receiver<FixedBytes<32>>,
highest_uninterrupted_block: u64,
) -> Result<HeaderSyncGap<Self::Header>, ProviderError>;
}
Expand description
Client trait for determining the current headers sync gap.
Required Associated Types§
Required Methods§
fn sync_gap(
&self,
tip: Receiver<FixedBytes<32>>,
highest_uninterrupted_block: u64,
) -> Result<HeaderSyncGap<Self::Header>, ProviderError>
fn sync_gap( &self, tip: Receiver<FixedBytes<32>>, highest_uninterrupted_block: u64, ) -> Result<HeaderSyncGap<Self::Header>, ProviderError>
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.