diff --git a/node/src/bin/space-cli.rs b/node/src/bin/space-cli.rs index 23481d7..2684319 100644 --- a/node/src/bin/space-cli.rs +++ b/node/src/bin/space-cli.rs @@ -400,7 +400,7 @@ async fn handle_commands( } Commands::EstimateBid { target } => { let response = cli.client.estimate_bid(target).await?; - println!("{} sat", Amount::from_sat(response).to_string()); + println!("{} sat", Amount::from_sat(response).to_sat()); } Commands::GetSpace { space } => { let space_hash = hash_space(&space).map_err(|e| ClientError::Custom(e.to_string()))?; diff --git a/protocol/src/slabel.rs b/protocol/src/slabel.rs index d37e39d..73b92be 100644 --- a/protocol/src/slabel.rs +++ b/protocol/src/slabel.rs @@ -14,7 +14,7 @@ use crate::errors::Error; pub const MAX_LABEL_LEN: usize = 62; pub const PUNYCODE_PREFIX: &[u8] = b"xn--"; -#[derive(Clone, Debug, PartialEq, Eq, PartialOrd, Ord)] +#[derive(Clone, Debug, PartialEq, Eq, PartialOrd, Ord, Hash)] pub struct SLabel([u8; MAX_LABEL_LEN + 1]); #[cfg(feature = "bincode")] @@ -87,7 +87,7 @@ impl<'de> Deserialize<'de> for SLabel { } } -#[derive(Copy, Clone, PartialEq, Eq, PartialOrd, Ord)] +#[derive(Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)] pub struct SLabelRef<'a>(pub &'a [u8]); impl AsRef<[u8]> for SLabel {