From 4344150d8648fcf0ca97e89aff45042392b611d7 Mon Sep 17 00:00:00 2001 From: Byron Hambly Date: Fri, 22 Mar 2024 10:18:25 +0200 Subject: [PATCH] change panic to bail --- swap/src/monero/wallet_rpc.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/swap/src/monero/wallet_rpc.rs b/swap/src/monero/wallet_rpc.rs index a2d79fc1..e227c3f3 100644 --- a/swap/src/monero/wallet_rpc.rs +++ b/swap/src/monero/wallet_rpc.rs @@ -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");