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 we resume the monitor, ensure that we provide the commitment update and
revoke-and-ack messages in the order that our counterparty expects them. With
an asynchronous signer, it's possible that the message may become available in
an order other than what's expected.
// Enforce the ordering between commitment update and revoke-and-ack: with an asynchronous
4111
+
// signer, they may have become available in an order that violates the ordering that our
4112
+
// counterparty expects. If that happens, suppress the out-of-order message and mark it as
4113
+
// pending. When the signer becomes unblocked we can provide the messages in the proper order.
4110
4114
let order = self.context.resend_order.clone();
4115
+
let (commitment_update, raa) = match order {
4116
+
RAACommitmentOrder::CommitmentFirst => {
4117
+
if self.context.signer_pending_commitment_update && raa.is_some() {
4118
+
log_trace!(logger, "RAA is available, but we can't deliver it because ordering requires CommitmentFirst; setting signer_pending_revoke_and_ack = true");
(commitment_update, if !self.context.signer_pending_commitment_update { raa } else { None })
4122
+
}
4123
+
4124
+
RAACommitmentOrder::RevokeAndACKFirst => {
4125
+
if self.context.signer_pending_revoke_and_ack && commitment_update.is_some() {
4126
+
log_trace!(logger, "commitment_update is available, but we can't deliver it because ordering requires RevokeAndACKFirst; setting signer_pending_commitment_update = true");
0 commit comments