Function lightning_block_sync::init::validate_best_block_header [−][src]
pub async fn validate_best_block_header<B: BlockSource>(
block_source: &mut B
) -> BlockSourceResult<ValidatedBlockHeader>
Expand description
Returns a validated block header of the source’s best chain tip.
Upon success, the returned header can be used to initialize SpvClient
. Useful during a fresh
start when there are no chain listeners to sync yet.