From d9c4938886ed43a7076d333ca3e218d4035fed50 Mon Sep 17 00:00:00 2001 From: Roman Zeyde Date: Sat, 24 Sep 2022 19:58:39 +0300 Subject: [PATCH] Fixup signet magic error message --- src/config.rs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/config.rs b/src/config.rs index 2103286..99f0092 100644 --- a/src/config.rs +++ b/src/config.rs @@ -234,7 +234,13 @@ impl Config { let magic = match (config.network, config.signet_magic) { (Network::Signet, Some(magic)) => u32::from_str_radix(&magic, 16) - .expect("Invalid signet hex magic") + .unwrap_or_else(|error| { + eprintln!( + "Error: signet magic '{}' is not a valid hex string: {}", + magic, error + ); + std::process::exit(1); + }) .swap_bytes(), (network, None) => network.magic(), (_, Some(_)) => {