File tree Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -9405,6 +9405,12 @@ where
94059405 false
94069406 }
94079407
9408+ /// Gets the latest inbound SCID alias from our peer, or if none exists, the channel's real
9409+ /// SCID.
9410+ pub fn get_inbound_scid(&self) -> Option<u64> {
9411+ self.context.latest_inbound_scid_alias.or(self.funding.get_short_channel_id())
9412+ }
9413+
94089414 /// Returns true if our channel_ready has been sent
94099415 pub fn is_our_channel_ready(&self) -> bool {
94109416 matches!(self.context.channel_state, ChannelState::AwaitingChannelReady(flags) if flags.is_set(AwaitingChannelReadyFlags::OUR_CHANNEL_READY))
Original file line number Diff line number Diff line change @@ -11524,8 +11524,9 @@ where
1152411524 .channel_by_id
1152511525 .iter()
1152611526 .filter(|(_, channel)| channel.context().is_usable())
11527- .min_by_key(|(_, channel)| channel.context().channel_creation_height)
11528- .and_then(|(_, channel)| channel.funding().get_short_channel_id()),
11527+ .filter_map(|(_, channel)| channel.as_funded())
11528+ .min_by_key(|funded_channel| funded_channel.context.channel_creation_height)
11529+ .and_then(|funded_channel| funded_channel.get_inbound_scid()),
1152911530 })
1153011531 .collect::<Vec<_>>()
1153111532 }
You can’t perform that action at this time.
0 commit comments