@@ -8813,27 +8813,56 @@ where
8813
8813
msg.your_last_funding_locked_txid
8814
8814
.is_none()
8815
8815
.then(|| ())
8816
+ // The sending node:
8817
+ // - if `my_current_funding_locked` is included:
8818
+ // - if `announce_channel` is set for this channel:
8819
+ // - if it has not received `announcement_signatures` for that transaction:
8820
+ // - MUST retransmit `channel_ready` or `splice_locked` after exchanging `channel_reestablish`.
8821
+ .or_else(|| {
8822
+ self.maybe_get_my_current_funding_locked()
8823
+ .filter(|funding| !funding.is_splice())
8824
+ .filter(|_| self.context.config.announce_for_forwarding)
8825
+ .filter(|_| self.context.announcement_sigs.is_none())
8826
+ .map(|_| ())
8827
+ })
8816
8828
.and_then(|_| self.get_channel_ready(logger))
8817
8829
} else { None };
8818
8830
8819
- // A receiving node:
8820
- // - if `your_last_funding_locked` is set and it does not match the most recent
8821
- // `splice_locked` it has sent:
8822
- // - MUST retransmit `splice_locked`.
8823
8831
let sent_splice_txid = self
8824
8832
.maybe_get_my_current_funding_locked()
8825
8833
.filter(|funding| funding.is_splice())
8826
8834
.map(|funding| {
8827
8835
funding.get_funding_txid().expect("Splice funding_txid should always be set")
8828
8836
});
8829
- let splice_locked = msg.your_last_funding_locked_txid.and_then(|last_funding_txid| {
8830
- sent_splice_txid
8831
- .filter(|sent_splice_txid| last_funding_txid != *sent_splice_txid)
8832
- .map(|splice_txid| msgs::SpliceLocked {
8833
- channel_id: self.context.channel_id,
8834
- splice_txid,
8835
- })
8836
- });
8837
+ let splice_locked = msg
8838
+ // A receiving node:
8839
+ // - if `your_last_funding_locked` is set and it does not match the most recent
8840
+ // `splice_locked` it has sent:
8841
+ // - MUST retransmit `splice_locked`.
8842
+ .your_last_funding_locked_txid
8843
+ .and_then(|last_funding_txid| {
8844
+ sent_splice_txid.filter(|sent_splice_txid| last_funding_txid != *sent_splice_txid)
8845
+ })
8846
+ // The sending node:
8847
+ // - if `my_current_funding_locked` is included:
8848
+ // - if `announce_channel` is set for this channel:
8849
+ // - if it has not received `announcement_signatures` for that transaction:
8850
+ // - MUST retransmit `channel_ready` or `splice_locked` after exchanging `channel_reestablish`.
8851
+ .or_else(|| {
8852
+ sent_splice_txid
8853
+ .filter(|_| self.context.config.announce_for_forwarding)
8854
+ .filter(|sent_splice_txid| {
8855
+ if self.funding.get_funding_txid() == Some(*sent_splice_txid) {
8856
+ self.context.announcement_sigs.is_none()
8857
+ } else {
8858
+ true
8859
+ }
8860
+ })
8861
+ })
8862
+ .map(|splice_txid| msgs::SpliceLocked {
8863
+ channel_id: self.context.channel_id,
8864
+ splice_txid,
8865
+ });
8837
8866
8838
8867
let mut commitment_update = None;
8839
8868
let mut tx_signatures = None;
0 commit comments