fn create_parent_block_id(
    blocks: &ledger_client::Blocks,
    block: &HashedBlock,
) -> Result<BlockIdentifier, ApiError> {
    let idx = std::cmp::max(0, to_index(block.index)? - 1);

    let parent = blocks.get_verified_at(idx as u64)?;
    convert::block_id(&parent)
}
// For the first block, we return the block itself as its parent
For the first block, we return the block itself as its parent
For the first block we return the block itself as its parent
fn create_parent_block_id(
    blocks: &ledger_client::Blocks,
    block: &HashedBlock,
) -> Result<BlockIdentifier, ApiError> {
    let idx = std::cmp::max(0, to_index(block.index)? - 1);
    let parent = blocks.get_verified_at(idx as u64)?;
    convert::block_id(&parent)
}
fn create_parent_block_id ( blocks : & ledger_client :: Blocks , block : & HashedBlock , ) -> Result < BlockIdentifier , ApiError > { let idx = std :: cmp :: max ( 0 , to_index ( block . index ) ? - 1 ) ; let parent = blocks . get_verified_at ( idx as u64 ) ? ; convert :: block_id ( & parent ) }
For the first block, we return the block itself as its parent
For the first block we return the block itself as its parent
blocks
&ledger_client::Blocks
block
&HashedBlock
blocks
&ledger_client::Blocks
block
&HashedBlock