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
None
- If no new block is available.Vec<BlockInfo>
- If new blocks are found.