From 3e674da2f43cd426ec5d865dbf1cb37136147858 Mon Sep 17 00:00:00 2001 From: 4TT1L4 <2914096+4TT1L4@users.noreply.github.com> Date: Tue, 30 Aug 2022 19:36:35 +0200 Subject: [PATCH] Logging: Typo in try_from_magic #404 --- src/utils/mod.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/utils/mod.rs b/src/utils/mod.rs index 1f3f656c..9976bc71 100644 --- a/src/utils/mod.rs +++ b/src/utils/mod.rs @@ -152,15 +152,14 @@ impl ChainWellKnownInfo { } } - /// Uses the value of the magic to return either mainnet or testnet - /// hardcoded values. + /// Try to identify the chain based on the specified magic value. pub fn try_from_magic(magic: u64) -> Result { match magic { MAINNET_MAGIC => Ok(Self::mainnet()), TESTNET_MAGIC => Ok(Self::testnet()), PREVIEW_MAGIC => Ok(Self::preview()), PREPROD_MAGIC => Ok(Self::preprod()), - _ => Err("can't infer well-known chain infro from specified magic".into()), + _ => Err(format!("can't identify chain from specified magic value: {}", magic).into()), } } }