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