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
sourceimpl<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
sourceimpl<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>
sourcefn 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.
sourcefn 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.
sourcefn 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.
Auto Trait Implementations
impl<B, T: ?Sized> RefUnwindSafe for ChainPoller<B, T> where
B: RefUnwindSafe,
impl<B, T: ?Sized> Send for ChainPoller<B, T>
impl<B, T: ?Sized> Sync for ChainPoller<B, T>
impl<B, T: ?Sized> Unpin for ChainPoller<B, T> where
B: Unpin,
impl<B, T: ?Sized> UnwindSafe for ChainPoller<B, T> where
B: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more