From bbffc8de9b0b589b61024586319c5e60460d9200 Mon Sep 17 00:00:00 2001 From: YI Date: Fri, 14 Jun 2024 08:42:56 +0800 Subject: [PATCH] Update remote commitment number on CommitmentSigned (not RevokeAndAck) Commitment numbers of each parties are independent. Updating remote commitment number after received RevokeAndAck effectively means we are using the same commitment number. --- src/ckb/channel.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ckb/channel.rs b/src/ckb/channel.rs index 01a0aaa8..3e5246c3 100644 --- a/src/ckb/channel.rs +++ b/src/ckb/channel.rs @@ -2852,6 +2852,7 @@ impl ChannelActorState { } } } + self.increment_remote_commitment_number(); Ok(()) } @@ -2969,7 +2970,6 @@ impl ChannelActorState { self.get_current_commitment_number(false) + 1 ); self.remote_commitment_points.push(commitment_point); - self.increment_remote_commitment_number(); } pub fn handle_revoke_and_ack_message(