@@ -8449,27 +8449,56 @@ where
8449
8449
msg.your_last_funding_locked_txid
8450
8450
.is_none()
8451
8451
.then(|| ())
8452
+ // The sending node:
8453
+ // - if `my_current_funding_locked` is included:
8454
+ // - if `announce_channel` is set for this channel:
8455
+ // - if it has not received `announcement_signatures` for that transaction:
8456
+ // - MUST retransmit `channel_ready` or `splice_locked` after exchanging `channel_reestablish`.
8457
+ .or_else(|| {
8458
+ self.maybe_get_my_current_funding_locked(features)
8459
+ .filter(|funding| !funding.is_splice())
8460
+ .filter(|_| self.context.config.announce_for_forwarding)
8461
+ .filter(|_| self.context.announcement_sigs.is_none())
8462
+ .map(|_| ())
8463
+ })
8452
8464
.and_then(|_| self.get_channel_ready(logger))
8453
8465
} else { None };
8454
8466
8455
- // A receiving node:
8456
- // - if `your_last_funding_locked` is set and it does not match the most recent
8457
- // `splice_locked` it has sent:
8458
- // - MUST retransmit `splice_locked`.
8459
8467
let sent_splice_txid = self
8460
8468
.maybe_get_my_current_funding_locked(features)
8461
8469
.filter(|funding| funding.is_splice())
8462
8470
.map(|funding| {
8463
8471
funding.get_funding_txid().expect("Splice funding_txid should always be set")
8464
8472
});
8465
- let splice_locked = msg.your_last_funding_locked_txid.and_then(|last_funding_txid| {
8466
- sent_splice_txid
8467
- .filter(|sent_splice_txid| last_funding_txid != *sent_splice_txid)
8468
- .map(|splice_txid| msgs::SpliceLocked {
8469
- channel_id: self.context.channel_id,
8470
- splice_txid,
8471
- })
8472
- });
8473
+ let splice_locked = msg
8474
+ // A receiving node:
8475
+ // - if `your_last_funding_locked` is set and it does not match the most recent
8476
+ // `splice_locked` it has sent:
8477
+ // - MUST retransmit `splice_locked`.
8478
+ .your_last_funding_locked_txid
8479
+ .and_then(|last_funding_txid| {
8480
+ sent_splice_txid.filter(|sent_splice_txid| last_funding_txid != *sent_splice_txid)
8481
+ })
8482
+ // The sending node:
8483
+ // - if `my_current_funding_locked` is included:
8484
+ // - if `announce_channel` is set for this channel:
8485
+ // - if it has not received `announcement_signatures` for that transaction:
8486
+ // - MUST retransmit `channel_ready` or `splice_locked` after exchanging `channel_reestablish`.
8487
+ .or_else(|| {
8488
+ sent_splice_txid
8489
+ .filter(|_| self.context.config.announce_for_forwarding)
8490
+ .filter(|sent_splice_txid| {
8491
+ if self.funding.get_funding_txid() == Some(*sent_splice_txid) {
8492
+ self.context.announcement_sigs.is_none()
8493
+ } else {
8494
+ true
8495
+ }
8496
+ })
8497
+ })
8498
+ .map(|splice_txid| msgs::SpliceLocked {
8499
+ channel_id: self.context.channel_id,
8500
+ splice_txid,
8501
+ });
8473
8502
8474
8503
let mut commitment_update = None;
8475
8504
let mut tx_signatures = None;
0 commit comments