1
0
mirror of https://github.com/romanz/electrs.git synced 2024-11-19 01:43:29 +01:00

Fixup signet magic error message

This commit is contained in:
Roman Zeyde 2022-09-24 19:58:39 +03:00
parent c71655c7f7
commit d9c4938886

View File

@ -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(_)) => {