alan-turing-institute / trustchain

Trustworthy decentralised PKI
https://alan-turing-institute.github.io/trustchain/
Apache License 2.0
10 stars 5 forks source link

Fix error variants in trustchain-ion utils #187

Open thobson88 opened 2 months ago

thobson88 commented 2 months ago

These error variants are incorrect:

    // If call to get_network_info fails, return error
    client
        .get_network_info()
        .map_err(|_| VerifierError::LedgerClientError("getblockhash".to_string()))?;

    // Convert the block height to a block hash.
    let block_hash = client
        .get_block_hash(u64::from(block_height))
        .map_err(|_| VerifierError::InvalidBlockHeight(block_height.into()))?;