pub trait Poll {
    fn poll_chain_tip<'a>(
        &'a mut self,
        best_known_chain_tip: ValidatedBlockHeader
    ) -> AsyncBlockSourceResult<'a, ChainTip>; fn look_up_previous_header<'a>(
        &'a mut self,
        header: &'a ValidatedBlockHeader
    ) -> AsyncBlockSourceResult<'a, ValidatedBlockHeader>; fn fetch_block<'a>(
        &'a mut self,
        header: &'a ValidatedBlockHeader
    ) -> AsyncBlockSourceResult<'a, ValidatedBlock>; }
Expand description

The Poll trait defines behavior for polling block sources for a chain tip and retrieving related chain data. It serves as an adapter for BlockSource.

ChainPoller adapts a single BlockSource, while any other implementations of Poll are required to be built in terms of it to ensure chain data validity.

Required methods

Returns a chain tip in terms of its relationship to the provided chain tip.

Returns the header that preceded the given header in the chain.

Returns the block associated with the given header.

Implementors