@@ -1216,6 +1216,7 @@ pub(super) struct ReestablishResponses {
1216
1216
pub tx_signatures: Option<msgs::TxSignatures>,
1217
1217
pub tx_abort: Option<msgs::TxAbort>,
1218
1218
pub splice_locked: Option<msgs::SpliceLocked>,
1219
+ pub implicit_splice_locked: Option<msgs::SpliceLocked>,
1219
1220
}
1220
1221
1221
1222
/// The first message we send to our peer after connection
@@ -8763,6 +8764,7 @@ where
8763
8764
tx_signatures: None,
8764
8765
tx_abort: None,
8765
8766
splice_locked: None,
8767
+ implicit_splice_locked: None,
8766
8768
});
8767
8769
}
8768
8770
@@ -8775,6 +8777,7 @@ where
8775
8777
tx_signatures: None,
8776
8778
tx_abort: None,
8777
8779
splice_locked: None,
8780
+ implicit_splice_locked: None,
8778
8781
});
8779
8782
}
8780
8783
@@ -8888,6 +8891,30 @@ where
8888
8891
splice_txid,
8889
8892
});
8890
8893
8894
+ // A receiving node:
8895
+ // - if splice transactions are pending and `my_current_funding_locked` matches one of
8896
+ // those splice transactions, for which it hasn't received `splice_locked` yet:
8897
+ // - MUST process `my_current_funding_locked` as if it was receiving `splice_locked`
8898
+ // for this `txid`.
8899
+ #[cfg(splicing)]
8900
+ let implicit_splice_locked = msg.my_current_funding_locked_txid.and_then(|funding_txid| {
8901
+ self.pending_funding
8902
+ .iter()
8903
+ .find(|funding| funding.get_funding_txid() == Some(funding_txid))
8904
+ .and_then(|_| {
8905
+ self.pending_splice.as_ref().and_then(|pending_splice| {
8906
+ (Some(funding_txid) != pending_splice.received_funding_txid)
8907
+ .then(|| funding_txid)
8908
+ })
8909
+ })
8910
+ .map(|splice_txid| msgs::SpliceLocked {
8911
+ channel_id: self.context.channel_id,
8912
+ splice_txid,
8913
+ })
8914
+ });
8915
+ #[cfg(not(splicing))]
8916
+ let implicit_splice_locked = None;
8917
+
8891
8918
let mut commitment_update = None;
8892
8919
let mut tx_signatures = None;
8893
8920
let mut tx_abort = None;
@@ -9003,6 +9030,7 @@ where
9003
9030
tx_signatures,
9004
9031
tx_abort,
9005
9032
splice_locked,
9033
+ implicit_splice_locked,
9006
9034
})
9007
9035
} else if msg.next_local_commitment_number == next_counterparty_commitment_number - 1 {
9008
9036
// We've made an update so we must have exchanged `tx_signatures`, implying that
@@ -9025,6 +9053,7 @@ where
9025
9053
tx_signatures,
9026
9054
tx_abort,
9027
9055
splice_locked,
9056
+ implicit_splice_locked,
9028
9057
})
9029
9058
} else {
9030
9059
let commitment_update = if self.context.resend_order == RAACommitmentOrder::RevokeAndACKFirst
@@ -9050,6 +9079,7 @@ where
9050
9079
tx_signatures,
9051
9080
tx_abort,
9052
9081
splice_locked,
9082
+ implicit_splice_locked,
9053
9083
})
9054
9084
}
9055
9085
} else if msg.next_local_commitment_number < next_counterparty_commitment_number {
0 commit comments