Skip to content

Commit

Permalink
Update remote commitment number on CommitmentSigned (not RevokeAndAck)
Browse files Browse the repository at this point in the history
Commitment numbers of each parties are independent. Updating remote
commitment number after received RevokeAndAck effectively means we are
using the same commitment number.
  • Loading branch information
contrun committed Jun 14, 2024
1 parent 68720f4 commit bbffc8d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/ckb/channel.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2852,6 +2852,7 @@ impl ChannelActorState {
}
}
}
self.increment_remote_commitment_number();
Ok(())
}

Expand Down Expand Up @@ -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(
Expand Down

0 comments on commit bbffc8d

Please sign in to comment.