Skip to content

Commit cf0539e

Browse files
committed
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.
1 parent 2be5e37 commit cf0539e

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

lightning/src/util/logger.rs

+4
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,10 @@ pub struct Record<'a> {
9898
/// The verbosity level of the message.
9999
pub level: Level,
100100
/// The node id of the peer pertaining to the logged record.
101+
///
102+
/// Note that in some cases a [`Self::channel_id`] may be filled in but this may still be
103+
/// `None`, depending on if the peer information is readily available in LDK when the log is
104+
/// generated.
101105
pub peer_id: Option<PublicKey>,
102106
/// The channel id of the channel pertaining to the logged record. May be a temporary id before
103107
/// the channel has been funded.

0 commit comments

Comments
 (0)