/// This gives you the index of the last block added to the chain
/// together with certification
This gives you the index of the last block added to the chain
together with certification
This gives you the index of the last block added to the chain together with certification
fn tip_of_chain() -> TipOfChainRes {
    let last_block_idx = &LEDGER
        .read()
        .unwrap()
        .blockchain
        .chain_length()
        .checked_sub(1)
        .unwrap();
    let certification = data_certificate();
    TipOfChainRes {
        certification,
        tip_index: *last_block_idx,
    }
}
fn tip_of_chain ( ) -> TipOfChainRes { let last_block_idx = & LEDGER . read ( ) . unwrap ( ) . blockchain . chain_length ( ) . checked_sub ( 1 ) . unwrap ( ) ; let certification = data_certificate ( ) ; TipOfChainRes { certification , tip_index : * last_block_idx , } }
This gives you the index of the last block added to the chain
together with certification
This gives you the index of the last block added to the chain together with certification