change panic to bail

This commit is contained in:
Byron Hambly 2024-03-22 10:18:25 +02:00
parent cfcc41e340
commit 4344150d86
No known key found for this signature in database
GPG Key ID: DE8F6EA20A661697

View File

@ -277,9 +277,10 @@ impl WalletRpc {
let result = hasher.finalize();
let result_hash = HEXLOWER.encode(result.as_ref());
if result_hash != DOWNLOAD_HASH {
panic!(
bail!(
"SHA256 of download ({}) does not match expected ({})!",
result_hash, DOWNLOAD_HASH
result_hash,
DOWNLOAD_HASH
);
} else {
tracing::debug!("Hashes match");