Skip to content

Commit b1c93d9

Browse files
authored
Merge pull request #188 from alan-turing-institute/187-fix-err-variants
Fix error variants/messages in trustchain-ion utils
2 parents 8864b4a + 715dcc6 commit b1c93d9

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

trustchain-ion/src/utils.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -268,15 +268,15 @@ pub async fn locate_transaction(
268268
.parse::<u32>()
269269
.map_err(|_| VerifierError::FailureToGetDIDOperation(suffix.to_owned()))?;
270270

271-
// If call to get_network_info fails, return error
271+
// If call to get_network_info fails, return error.
272272
client
273273
.get_network_info()
274-
.map_err(|_| VerifierError::LedgerClientError("getblockhash".to_string()))?;
274+
.map_err(|_| VerifierError::LedgerClientError("getnetworkinfo".to_string()))?;
275275

276276
// Convert the block height to a block hash.
277277
let block_hash = client
278278
.get_block_hash(u64::from(block_height))
279-
.map_err(|_| VerifierError::InvalidBlockHeight(block_height.into()))?;
279+
.map_err(|_| VerifierError::LedgerClientError("getblockhash".to_string()))?;
280280

281281
Ok((block_hash, tx_index))
282282
}

0 commit comments

Comments
 (0)