Ensure we log private channel_updates at a non-GOSSIP log level 2022-08-log-chan_update
authorMatt Corallo <git@bluematt.me>
Mon, 5 Sep 2022 16:28:11 +0000 (16:28 +0000)
committerMatt Corallo <git@bluematt.me>
Tue, 6 Sep 2022 17:49:40 +0000 (17:49 +0000)
If we receive a channel_update for one of our private channels, we
will not log the message at the usual TRACE log level as the
message falls into the gossip range. However, for our own channels
they aren't *just* gossip, as we store that info and it changes
how we generate invoices. Thus, we add a log in `ChannelManager`
here at the DEBUG log level.

lightning/src/ln/channelmanager.rs

index d011d6b42c8621314dfd44fe49709bac702b6620..2dd735ccd51078c0f0080d9fd6fc63a7ff7b2cd5 100644 (file)
@@ -5154,6 +5154,7 @@ impl<Signer: Sign, M: Deref, T: Deref, K: Deref, F: Deref, L: Deref> ChannelMana
                                if were_node_one == msg_from_node_one {
                                        return Ok(NotifyOption::SkipPersist);
                                } else {
+                                       log_debug!(self.logger, "Received channel_update for channel {}.", log_bytes!(chan_id));
                                        try_chan_entry!(self, chan.get_mut().channel_update(&msg), channel_state, chan);
                                }
                        },