clementine_core::bitcoin_syncer

Function fetch_new_blocks

Source
async fn fetch_new_blocks(
    db: &Database,
    rpc: &ExtendedBitcoinRpc,
    current_height: u32,
) -> Result<Option<Vec<BlockInfo>>, BridgeError>
Expand description

Fetches the next block from Bitcoin, if it exists. Will also fetch previous blocks if the parent is missing, up to 100 blocks.

§Parameters

  • current_height: The height of the current tip in the database.

§Returns