X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=lightning%2Fsrc%2Futil%2Fmacro_logger.rs;h=4836b4d6814f705cb111515a983733c4566e3a34;hb=62fd36d795f99887260aa962a0e8f30e3b5504fa;hp=e79980370342ff01920fe5a37b4423719a228ac7;hpb=9b614f4ff226da918d9f730a7531f40d2e333aab;p=rust-lightning diff --git a/lightning/src/util/macro_logger.rs b/lightning/src/util/macro_logger.rs index e7998037..4836b4d6 100644 --- a/lightning/src/util/macro_logger.rs +++ b/lightning/src/util/macro_logger.rs @@ -15,7 +15,6 @@ use bitcoin::blockdata::transaction::Transaction; use crate::routing::router::Route; use crate::ln::chan_utils::HTLCClaim; -use crate::util::logger::DebugBytes; macro_rules! log_iter { ($obj: expr) => { @@ -42,10 +41,7 @@ macro_rules! log_bytes { pub(crate) struct DebugFundingChannelId<'a>(pub &'a Txid, pub u16); impl<'a> core::fmt::Display for DebugFundingChannelId<'a> { fn fmt(&self, f: &mut core::fmt::Formatter) -> Result<(), core::fmt::Error> { - for i in (OutPoint { txid: self.0.clone(), index: self.1 }).to_channel_id().iter() { - write!(f, "{:02x}", i)?; - } - Ok(()) + (OutPoint { txid: self.0.clone(), index: self.1 }).to_channel_id().fmt(f) } } macro_rules! log_funding_channel_id { @@ -57,7 +53,7 @@ macro_rules! log_funding_channel_id { pub(crate) struct DebugFundingInfo<'a, T: 'a>(pub &'a (OutPoint, T)); impl<'a, T> core::fmt::Display for DebugFundingInfo<'a, T> { fn fmt(&self, f: &mut core::fmt::Formatter) -> Result<(), core::fmt::Error> { - DebugBytes(&(self.0).0.to_channel_id()[..]).fmt(f) + (self.0).0.to_channel_id().fmt(f) } } macro_rules! log_funding_info {