@@ -1214,6 +1214,7 @@ pub(super) struct ReestablishResponses {
1214
1214
pub tx_signatures: Option<msgs::TxSignatures>,
1215
1215
pub tx_abort: Option<msgs::TxAbort>,
1216
1216
pub splice_locked: Option<msgs::SpliceLocked>,
1217
+ pub implicit_splice_locked: Option<msgs::SpliceLocked>,
1217
1218
}
1218
1219
1219
1220
/// The first message we send to our peer after connection
@@ -8396,6 +8397,7 @@ where
8396
8397
tx_signatures: None,
8397
8398
tx_abort: None,
8398
8399
splice_locked: None,
8400
+ implicit_splice_locked: None,
8399
8401
});
8400
8402
}
8401
8403
@@ -8408,6 +8410,7 @@ where
8408
8410
tx_signatures: None,
8409
8411
tx_abort: None,
8410
8412
splice_locked: None,
8413
+ implicit_splice_locked: None,
8411
8414
});
8412
8415
}
8413
8416
@@ -8519,6 +8522,26 @@ where
8519
8522
splice_txid,
8520
8523
});
8521
8524
8525
+ // A receiving node:
8526
+ // - if splice transactions are pending and `my_current_funding_locked` matches one of
8527
+ // those splice transactions, for which it hasn't received `splice_locked` yet:
8528
+ // - MUST process `my_current_funding_locked` as if it was receiving `splice_locked`
8529
+ // for this `txid`.
8530
+ let implicit_splice_locked = msg.my_current_funding_locked_txid
8531
+ .and_then(|funding_txid| {
8532
+ self.pending_funding.iter()
8533
+ .find(|funding| funding.get_funding_txid() == Some(funding_txid))
8534
+ .and_then(|_| {
8535
+ self.pending_splice
8536
+ .as_ref()
8537
+ .and_then(|pending_splice| (Some(funding_txid) != pending_splice.received_funding_txid).then(|| funding_txid))
8538
+ })
8539
+ .map(|splice_txid| msgs::SpliceLocked {
8540
+ channel_id: self.context.channel_id,
8541
+ splice_txid,
8542
+ })
8543
+ });
8544
+
8522
8545
let mut commitment_update = None;
8523
8546
let mut tx_signatures = None;
8524
8547
let mut tx_abort = None;
@@ -8626,6 +8649,7 @@ where
8626
8649
tx_signatures,
8627
8650
tx_abort,
8628
8651
splice_locked,
8652
+ implicit_splice_locked,
8629
8653
})
8630
8654
} else if msg.next_local_commitment_number == next_counterparty_commitment_number - 1 {
8631
8655
// We've made an update so we must have exchanged `tx_signatures`, implying that
@@ -8648,6 +8672,7 @@ where
8648
8672
tx_signatures,
8649
8673
tx_abort,
8650
8674
splice_locked,
8675
+ implicit_splice_locked,
8651
8676
})
8652
8677
} else {
8653
8678
let commitment_update = if self.context.resend_order == RAACommitmentOrder::RevokeAndACKFirst
@@ -8673,6 +8698,7 @@ where
8673
8698
tx_signatures,
8674
8699
tx_abort,
8675
8700
splice_locked,
8701
+ implicit_splice_locked,
8676
8702
})
8677
8703
}
8678
8704
} else if msg.next_local_commitment_number < next_counterparty_commitment_number {
0 commit comments