Skip to content

Commit c156eea

Browse files
committed
edit user_channel_id docs for Event::ChannelClosed
1 parent 14eb2d7 commit c156eea

File tree

2 files changed

+9
-5
lines changed

2 files changed

+9
-5
lines changed

lightning/src/ln/channelmanager.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4291,8 +4291,8 @@ impl<Signer: Sign, M: Deref, T: Deref, K: Deref, F: Deref, L: Deref> ChannelMana
42914291
/// [`Event::ChannelClosed::user_channel_id`] to allow tracking of which events correspond
42924292
/// with which `accept_inbound_channel` call.
42934293
///
4294-
/// [`Event::OpenChannelRequest`]: crate::util::events::Event::OpenChannelRequest
4295-
/// [`Event::ChannelClosed::user_channel_id`]: crate::util::events::Event::ChannelClosed::user_channel_id
4294+
/// [`Event::OpenChannelRequest`]: events::Event::OpenChannelRequest
4295+
/// [`Event::ChannelClosed::user_channel_id`]: events::Event::ChannelClosed::user_channel_id
42964296
pub fn accept_inbound_channel(&self, temporary_channel_id: &[u8; 32], user_channel_id: Option<u64>) -> Result<(), APIError> {
42974297
let _persistence_guard = PersistenceNotifierGuard::notify_on_drop(&self.total_consistency_lock, &self.persistence_notifier);
42984298

lightning/src/util/events.rs

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -365,11 +365,15 @@ pub enum Event {
365365
/// The channel_id of the channel which has been closed. Note that on-chain transactions
366366
/// resolving the channel are likely still awaiting confirmation.
367367
channel_id: [u8; 32],
368-
/// The `user_channel_id` value passed in to [`ChannelManager::create_channel`], or 0 for
369-
/// an inbound channel. This will always be zero for objects serialized with LDK versions
370-
/// prior to 0.0.102.
368+
/// The `user_channel_id` value passed in to [`ChannelManager::create_channel`] for outbound
369+
/// channels, or to [`ChannelManager::accept_inbound_channel`] for inbound channels if
370+
/// [`UserConfig::manually_accept_inbound_channels`] config flag is set to true. Otherwise
371+
/// `user_channel_id` will be 0 for an inbound channel.
372+
/// This will always be zero for objects serialized with LDK versions prior to 0.0.102.
371373
///
372374
/// [`ChannelManager::create_channel`]: crate::ln::channelmanager::ChannelManager::create_channel
375+
/// [`ChannelManager::accept_inbound_channel`]: crate::ln::channelmanager::ChannelManager::accept_inbound_channel
376+
/// [`UserConfig::manually_accept_inbound_channels`]: crate::util::config::UserConfig::manually_accept_inbound_channels
373377
user_channel_id: u64,
374378
/// The reason the channel was closed.
375379
reason: ClosureReason

0 commit comments

Comments
 (0)