You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When monitor updating is restored, we may have a situation where the signer
still has not returned a signature for the counterparty commitment. If this is
the case, note that the _signer_ is still pending a commitment update event
though the _monitor_ is not.
Similarly, only allow the revoke-and-ack to be generated in the case that
we're not still pending the counterparty commitment signature. If the monitor
was pending a revoke-and-ack and the commitment update is not available, then
note that _signer_ is still pending a revoke-and-ack.
Ensure that we honor the ordering specified by the channel.
log_debug!(logger, "Received valid commitment_signed from peer in channel {}, updated HTLC state but awaiting a monitor update resolution to reply.",
3164
-
&self.context.channel_id);
3169
+
log_debug!(logger, "Received valid commitment_signed from peer in channel {}, updated HTLC state and set sequence to {} but awaiting a monitor update resolution to reply.",
@@ -3177,8 +3183,8 @@ impl<SP: Deref> Channel<SP> where
3177
3183
true
3178
3184
} else { false };
3179
3185
3180
-
log_debug!(logger, "Received valid commitment_signed from peer in channel {}, updating HTLC state and responding with{} a revoke_and_ack.",
3181
-
&self.context.channel_id(), if need_commitment_signed { " our own commitment_signed and" } else { "" });
3186
+
log_debug!(logger, "Received valid commitment_signed from peer in channel {}, updating HTLC state and set sequence to {}; responding with{} a revoke_and_ack.",
3187
+
&self.context.channel_id(), self.context.cur_holder_commitment_transaction_number, if need_commitment_signed { " our own commitment_signed and" } else { "" });
let next_per_commitment_point = self.context.holder_signer.as_ref().get_per_commitment_point(self.context.cur_holder_commitment_transaction_number, &self.context.secp_ctx);
3912
3957
let per_commitment_secret = self.context.holder_signer.as_ref().release_commitment_secret(self.context.cur_holder_commitment_transaction_number + 2);
3913
-
msgs::RevokeAndACK {
3958
+
Some(msgs::RevokeAndACK {
3914
3959
channel_id: self.context.channel_id,
3915
3960
per_commitment_secret,
3916
3961
next_per_commitment_point,
3917
3962
#[cfg(taproot)]
3918
3963
next_local_nonce: None,
3919
-
}
3964
+
})
3920
3965
}
3921
3966
3922
3967
/// Gets the last commitment update for immediate sending to our peer.
@@ -3976,8 +4021,8 @@ impl<SP: Deref> Channel<SP> where
3976
4021
})
3977
4022
} else { None };
3978
4023
3979
-
log_trace!(logger, "Regenerated latest commitment update in channel {} with{} {} update_adds, {} update_fulfills, {} update_fails, and {} update_fail_malformeds",
0 commit comments