@@ -9767,13 +9767,6 @@ where
9767
9767
self.context.latest_inbound_scid_alias.or(self.funding.get_short_channel_id())
9768
9768
}
9769
9769
9770
- /// Returns true if their channel_ready has been received
9771
- #[cfg(splicing)]
9772
- pub fn is_their_channel_ready(&self) -> bool {
9773
- matches!(self.context.channel_state, ChannelState::AwaitingChannelReady(flags) if flags.is_set(AwaitingChannelReadyFlags::THEIR_CHANNEL_READY))
9774
- || matches!(self.context.channel_state, ChannelState::ChannelReady(_))
9775
- }
9776
-
9777
9770
/// Returns true if our channel_ready has been sent
9778
9771
pub fn is_our_channel_ready(&self) -> bool {
9779
9772
matches!(self.context.channel_state, ChannelState::AwaitingChannelReady(flags) if flags.is_set(AwaitingChannelReadyFlags::OUR_CHANNEL_READY))
@@ -10549,31 +10542,18 @@ where
10549
10542
}
10550
10543
10551
10544
#[cfg(splicing)]
10552
- fn maybe_get_your_last_funding_locked_txid(&self) -> Option<Txid> {
10553
- self.pending_splice
10554
- .as_ref()
10555
- .and_then(|pending_splice| pending_splice.received_funding_txid)
10556
- .or_else(|| {
10557
- self.is_their_channel_ready().then(|| self.funding.get_funding_txid()).flatten()
10558
- })
10559
- }
10560
- #[cfg(not(splicing))]
10561
- fn maybe_get_your_last_funding_locked_txid(&self) -> Option<Txid> {
10562
- None
10563
- }
10564
-
10565
- #[cfg(splicing)]
10566
- fn maybe_get_my_current_funding_locked_txid(&self) -> Option<Txid> {
10545
+ fn maybe_get_my_current_funding_locked(&self) -> Option<msgs::FundingLocked> {
10567
10546
self.pending_splice
10568
10547
.as_ref()
10569
10548
.and_then(|pending_splice| pending_splice.sent_funding_txid)
10570
10549
.or_else(|| {
10571
10550
self.is_our_channel_ready().then(|| self.funding.get_funding_txid()).flatten()
10572
10551
})
10552
+ .map(|txid| msgs::FundingLocked { txid, retransmit_flags: 0 })
10573
10553
}
10574
10554
10575
10555
#[cfg(not(splicing))]
10576
- fn maybe_get_my_current_funding_locked_txid (&self) -> Option<Txid > {
10556
+ fn maybe_get_my_current_funding_locked (&self) -> Option<msgs::FundingLocked > {
10577
10557
None
10578
10558
}
10579
10559
@@ -10628,7 +10608,7 @@ where
10628
10608
your_last_per_commitment_secret: remote_last_secret,
10629
10609
my_current_per_commitment_point: dummy_pubkey,
10630
10610
next_funding_txid: self.maybe_get_next_funding_txid(),
10631
- my_current_funding_locked_txid : self.maybe_get_my_current_funding_locked_txid (),
10611
+ my_current_funding_locked : self.maybe_get_my_current_funding_locked (),
10632
10612
}
10633
10613
}
10634
10614
0 commit comments