Struct lightning_block_sync::poll::ChainPoller
source · pub struct ChainPoller<B: Deref<Target = T> + Sized + Send + Sync, T: BlockSource + ?Sized> { /* private fields */ }
Expand description
The canonical Poll
implementation used for a single BlockSource
.
Other Poll
implementations should be built using ChainPoller
as it provides the simplest way
of validating chain data and checking consistency.
Implementations§
source§impl<B: Deref<Target = T> + Sized + Send + Sync, T: BlockSource + ?Sized> ChainPoller<B, T>
impl<B: Deref<Target = T> + Sized + Send + Sync, T: BlockSource + ?Sized> ChainPoller<B, T>
Trait Implementations§
source§impl<B: Deref<Target = T> + Sized + Send + Sync, T: BlockSource + ?Sized> Poll for ChainPoller<B, T>
impl<B: Deref<Target = T> + Sized + Send + Sync, T: BlockSource + ?Sized> Poll for ChainPoller<B, T>
source§fn poll_chain_tip<'a>(
&'a self,
best_known_chain_tip: ValidatedBlockHeader
) -> AsyncBlockSourceResult<'a, ChainTip>
fn poll_chain_tip<'a>(
&'a self,
best_known_chain_tip: ValidatedBlockHeader
) -> AsyncBlockSourceResult<'a, ChainTip>
Returns a chain tip in terms of its relationship to the provided chain tip.
source§fn look_up_previous_header<'a>(
&'a self,
header: &'a ValidatedBlockHeader
) -> AsyncBlockSourceResult<'a, ValidatedBlockHeader>
fn look_up_previous_header<'a>(
&'a self,
header: &'a ValidatedBlockHeader
) -> AsyncBlockSourceResult<'a, ValidatedBlockHeader>
Returns the header that preceded the given header in the chain.
source§fn fetch_block<'a>(
&'a self,
header: &'a ValidatedBlockHeader
) -> AsyncBlockSourceResult<'a, ValidatedBlock>
fn fetch_block<'a>(
&'a self,
header: &'a ValidatedBlockHeader
) -> AsyncBlockSourceResult<'a, ValidatedBlock>
Returns the block associated with the given header.