From ed75ce35ab80defe8cef71248d1d55ffbe8b280f Mon Sep 17 00:00:00 2001 From: Matt Corallo Date: Sat, 2 Dec 2023 18:45:03 +0000 Subject: [PATCH] Drop `log_bytes!()` calls on `Display` types in `ChannelManager` df3ab2ee2753e7f9ec02ddf1c8a51db77c50e35d was rebased one too many times and ended up reverting some of the `log_bytes!()` removals around types which now implement `Display` in `ChannelManager`. This commit removes those, as well as one additoinal excess macro which slipped in somewhere else. --- lightning/src/ln/channelmanager.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lightning/src/ln/channelmanager.rs b/lightning/src/ln/channelmanager.rs index e9a583578..c5fa1d21c 100644 --- a/lightning/src/ln/channelmanager.rs +++ b/lightning/src/ln/channelmanager.rs @@ -3215,7 +3215,7 @@ where /// [`internal_closing_signed`]: Self::internal_closing_signed fn get_channel_update_for_unicast(&self, chan: &Channel) -> Result { let logger = WithChannelContext::from(&self.logger, &chan.context); - log_trace!(logger, "Attempting to generate channel update for channel {}", log_bytes!(chan.context.channel_id().0)); + log_trace!(logger, "Attempting to generate channel update for channel {}", chan.context.channel_id()); let short_channel_id = match chan.context.get_short_channel_id().or(chan.context.latest_inbound_scid_alias()) { None => return Err(LightningError{err: "Channel not yet established".to_owned(), action: msgs::ErrorAction::IgnoreError}), Some(id) => id, @@ -3226,7 +3226,7 @@ where fn get_channel_update_for_onion(&self, short_channel_id: u64, chan: &Channel) -> Result { let logger = WithChannelContext::from(&self.logger, &chan.context); - log_trace!(logger, "Generating channel update for channel {}", log_bytes!(chan.context.channel_id().0)); + log_trace!(logger, "Generating channel update for channel {}", chan.context.channel_id()); let were_node_one = self.our_network_pubkey.serialize()[..] < chan.context.get_counterparty_node_id().serialize()[..]; let enabled = chan.context.is_usable() && match chan.channel_update_status() { @@ -6987,7 +6987,7 @@ where }, hash_map::Entry::Vacant(_) => { log_debug!(logger, "Sending bogus ChannelReestablish for unknown channel {} to force channel closure", - log_bytes!(msg.channel_id.0)); + msg.channel_id); // Unfortunately, lnd doesn't force close on errors // (https://github.com/lightningnetwork/lnd/blob/abb1e3463f3a83bbb843d5c399869dbe930ad94f/htlcswitch/link.go#L2119). // One of the few ways to get an lnd counterparty to force close is by @@ -10425,7 +10425,7 @@ where hash_map::Entry::Occupied(mut entry) => { let newly_added = entry.get_mut().insert(session_priv_bytes, &path); log_info!(logger, "{} a pending payment path for {} msat for session priv {} on an existing pending payment with payment hash {}", - if newly_added { "Added" } else { "Had" }, path_amt, log_bytes!(session_priv_bytes), log_bytes!(htlc.payment_hash.0)); + if newly_added { "Added" } else { "Had" }, path_amt, log_bytes!(session_priv_bytes), htlc.payment_hash); }, hash_map::Entry::Vacant(entry) => { let path_fee = path.fee_msat(); -- 2.39.5