-
Notifications
You must be signed in to change notification settings - Fork 29
fix: index in cmtcrypto.Proof #668
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
🚨 Bugbot Trial ExpiredYour team's Bugbot trial has expired. Please contact your team administrator to turn on the paid plan to continue using Bugbot. A team admin can activate the plan in the Cursor dashboard. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR fixes an issue where the index field in cmtcrypto.Proof was being omitted from JSON serialization when its value was 0 due to the omitempty tag. The fix introduces a custom proof struct without the omitempty tag to ensure the index field is always included in the JSON output.
- Introduces a CustomProof struct that always includes the index field in JSON serialization
- Adds a ConvertProof function to transform cmtcrypto.Proof to CustomProof
- Updates all usage locations to use the new CustomProof struct instead of the original cmtcrypto.Proof
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| bsn/cosmos/clientcontroller/msg.go | Adds CustomProof struct and ConvertProof function, updates SubmitFinalitySignature to use CustomProof |
| bsn/cosmos/clientcontroller/consumer.go | Updates SubmitBatchFinalitySigs to use ConvertProof function |
| itest/test_helpers.go | Updates GenFinalitySigExecMsg to use ConvertProof function and reorders imports |
| bsn/cosmos/clientcontroller/msg_test.go | Adds comprehensive tests for the CustomProof functionality |
| CHANGELOG.md | Documents the bug fix in the changelog |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Lazar955
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, just fix the comment above
(cherry picked from commit 833ad96)
<hr>This is an automatic backport of pull request #668 done by [Mergify](https://mergify.com). Co-authored-by: Gurjot Singh <111540954+gusin13@users.noreply.github.com>
No description provided.