-
Notifications
You must be signed in to change notification settings - Fork 302
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
refactor(types): Add ToProto method for RowProof struct #1600
base: v0.34.x-celestia
Are you sure you want to change the base?
Conversation
Extract ToProto functionality from ShareProof into a dedicated method for RowProof to improve code modularity and maintainability. This change makes the conversion between domain and protobuf types more consistent across the codebase.
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.
thanks
we need a roundtrip test for all to and from proto methods as they are huge footguns
@evan-forbes added tests |
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.
LGTM. Thanks for the unit tests 👍
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.
@VolodymyrBg can you please fix the CI?
Yes. |
@rach-id Done |
Description
This PR introduces a dedicated ToProto() method for the RowProof struct, addressing a TODO comment in the codebase. The change improves code modularity and maintainability by extracting the protobuf conversion logic from ShareProof.ToProto() into a separate method.
Key Changes:
Files Modified:
types/row_proof.go: Added new ToProto() method
types/share_proof.go: Updated to use new RowProof.ToProto()
This is a small, focused change that improves code organization without changing any functionality. The conversion logic remains the same but is now properly encapsulated in the RowProof struct.
PR checklist