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§

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

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

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.