darkfid::task::sync

Function retrieve_blocks

Source
async fn retrieve_blocks(
    node: &DarkfiNodePtr,
    peers: &[ChannelPtr],
    last_known: (u32, HeaderHash),
    block_sub: &JsonSubscriber,
    checkpoint_blocks: bool,
) -> Result<(u32, HeaderHash)>
Expand description

Auxiliary function to retrieve blocks of provided headers and apply them to canonical.