Skip to content

Commit 952cee4

Browse files
committed
Add notes about SCID alias rotation to ChannelDetails docs
1 parent c47acd7 commit 952cee4

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

lightning/src/ln/channelmanager.rs

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1218,6 +1218,9 @@ pub struct ChannelDetails {
12181218
/// counterparty will recognize the alias provided here in place of the [`short_channel_id`]
12191219
/// when they see a payment to be routed to us.
12201220
///
1221+
/// Our counterparty may choose to rotate this value at any time, though will always recognize
1222+
/// previous values for inbound payment forwarding.
1223+
///
12211224
/// [`short_channel_id`]: Self::short_channel_id
12221225
pub inbound_scid_alias: Option<u64>,
12231226
/// The value, in satoshis, of this channel as appears in the funding output
@@ -1306,9 +1309,12 @@ pub struct ChannelDetails {
13061309
}
13071310

13081311
impl ChannelDetails {
1309-
/// Gets the SCID which should be used to identify this channel for inbound payments. This
1310-
/// should be used for providing invoice hints or in any other context where our counterparty
1311-
/// will forward a payment to us.
1312+
/// Gets the current SCID which should be used to identify this channel for inbound payments.
1313+
/// This should be used for providing invoice hints or in any other context where our
1314+
/// counterparty will forward a payment to us.
1315+
///
1316+
/// This is either the [`ChannelDetails::inbound_scid_alias`], if set, or the
1317+
/// [`ChannelDetails::short_channel_id`]. See those for more information.
13121318
pub fn get_inbound_payment_scid(&self) -> Option<u64> {
13131319
self.inbound_scid_alias.or(self.short_channel_id)
13141320
}

0 commit comments

Comments
 (0)