Struct lightning_block_sync::poll::ChainPoller[][src]

pub struct ChainPoller<B: DerefMut<Target = T> + Sized, T: BlockSource> { /* fields omitted */ }
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

Creates a new poller for the given block source.

If the network parameter is mainnet, then the difficulty between blocks is checked for validity.

Trait Implementations

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.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.