From: Matt Corallo Date: Sun, 3 Dec 2023 19:09:32 +0000 (+0000) Subject: Doc that `Record::node_id` may be missing even with `channel_id` X-Git-Tag: v0.0.119~32^2 X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=commitdiff_plain;h=refs%2Fheads%2F2023-12-2314-cleanups-3;hp=2be5e370e3e80fd2a987e0199ace47845f23e87d;p=rust-lightning Doc that `Record::node_id` may be missing even with `channel_id` There are various place where we log something related to a channel but fail to fill in the channel's counterparty information. This is somewhat surprising, given channel counterparty information is always known, but simply is sometimes not readily accessible to LDK when a log is printed. --- diff --git a/lightning/src/util/logger.rs b/lightning/src/util/logger.rs index f1534933..8ca5333f 100644 --- a/lightning/src/util/logger.rs +++ b/lightning/src/util/logger.rs @@ -98,6 +98,10 @@ pub struct Record<'a> { /// The verbosity level of the message. pub level: Level, /// The node id of the peer pertaining to the logged record. + /// + /// Note that in some cases a [`Self::channel_id`] may be filled in but this may still be + /// `None`, depending on if the peer information is readily available in LDK when the log is + /// generated. pub peer_id: Option, /// The channel id of the channel pertaining to the logged record. May be a temporary id before /// the channel has been funded.