@@ -10756,6 +10756,9 @@ where
1075610756 let required_revoke = if msg.next_remote_commitment_number == our_commitment_transaction {
1075710757 // Remote isn't waiting on any RevokeAndACK from us!
1075810758 // Note that if we need to repeat our ChannelReady we'll do that in the next if block.
10759+ // If a stale ChannelManager replayed a completed update, the monitor-pending state may
10760+ // still think we owe one; the reestablish proof is authoritative here.
10761+ self.context.monitor_pending_revoke_and_ack = false;
1075910762 None
1076010763 } else if msg.next_remote_commitment_number + 1 == our_commitment_transaction {
1076110764 if self.context.channel_state.is_monitor_update_in_progress() {
@@ -10826,9 +10829,25 @@ where
1082610829 channel_id: self.context.channel_id,
1082710830 splice_txid,
1082810831 })
10832+ }).or_else(|| {
10833+ // If a splice confirms after we've sent `channel_reestablish` but before we've received
10834+ // theirs, we may promote the splice and clear `pending_splice`. We still need to send
10835+ // `splice_locked` after reestablishing as it was not included in our
10836+ // `channel_reestablish`.
10837+ let current_funding_txid = self.funding.get_funding_txid()?;
10838+ (self.pending_splice.is_none()
10839+ && self.funding.channel_transaction_parameters.splice_parent_funding_txid.is_some()
10840+ && Some(current_funding_txid) != funding_locked_txid_sent_in_reestablish)
10841+ .then(|| msgs::SpliceLocked {
10842+ channel_id: self.context.channel_id,
10843+ splice_txid: current_funding_txid,
10844+ })
1082910845 });
1083010846
1083110847 if msg.next_local_commitment_number == next_counterparty_commitment_number {
10848+ // If a stale ChannelManager replayed a completed update, the monitor-pending state may
10849+ // still think we owe one.
10850+ self.context.monitor_pending_commitment_signed = false;
1083210851 if required_revoke.is_some() || self.context.signer_pending_revoke_and_ack {
1083310852 log_debug!(logger, "Reconnected with only lost outbound RAA");
1083410853 } else {
0 commit comments