X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=lightning-block-sync%2Fsrc%2Fpoll.rs;h=fbe803b4cf3f12aafd17b5fb7776346f9686570b;hb=f551d5946b3acffefafba2c267116f2ebdbdc973;hp=34be2437c8e2ddae1a3f2c07d43de702c036d10b;hpb=4894d52d30399c21b7994952a8de0d1d7848c58d;p=rust-lightning diff --git a/lightning-block-sync/src/poll.rs b/lightning-block-sync/src/poll.rs index 34be2437..fbe803b4 100644 --- a/lightning-block-sync/src/poll.rs +++ b/lightning-block-sync/src/poll.rs @@ -1,3 +1,5 @@ +//! Adapters that make one or more [`BlockSource`]s simpler to poll for new chain tip transitions. + use crate::{AsyncBlockSourceResult, BlockHeaderData, BlockSource, BlockSourceError, BlockSourceResult}; use bitcoin::blockdata::block::Block; @@ -158,12 +160,12 @@ impl std::ops::Deref for ValidatedBlock { /// /// Other `Poll` implementations must be built using `ChainPoller` as it provides the only means of /// validating chain data. -pub struct ChainPoller + Sized + Sync + Send, T: BlockSource> { +pub struct ChainPoller + Sized , T: BlockSource> { block_source: B, network: Network, } -impl + Sized + Sync + Send, T: BlockSource> ChainPoller { +impl + Sized , T: BlockSource> ChainPoller { /// Creates a new poller for the given block source. /// /// If the `network` parameter is mainnet, then the difficulty between blocks is checked for @@ -173,7 +175,7 @@ impl + Sized + Sync + Send, T: BlockSource> ChainPoller + Sized + Sync + Send, T: BlockSource> Poll for ChainPoller { +impl + Sized + Send + Sync, T: BlockSource> Poll for ChainPoller { fn poll_chain_tip<'a>(&'a mut self, best_known_chain_tip: ValidatedBlockHeader) -> AsyncBlockSourceResult<'a, ChainTip> {