Skip to content
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

Give FraudProofVariant explicit codec indexes #3283

Merged
merged 1 commit into from
Dec 5, 2024
Merged

Conversation

teor2345
Copy link
Member

@teor2345 teor2345 commented Dec 4, 2024

A conditionally compiled variant changes enum variant numbering for everything after that variant, so giving the variants explicit indexes means that the order of the Dummy variant doesn't matter.

And in Rust, conditional compilation only applies to the item, variant, or block:
https://doc.rust-lang.org/reference/conditional-compilation.html#forms-of-conditional-compilation

Code contributor checklist:

@teor2345 teor2345 added the documentation Improvements or additions to documentation label Dec 4, 2024
@teor2345 teor2345 self-assigned this Dec 4, 2024
@teor2345 teor2345 changed the title Fix incorrect comment in fraud_proof.rs Give FraudProofVariants explicit codec indexes Dec 5, 2024
@teor2345 teor2345 changed the title Give FraudProofVariants explicit codec indexes Give FraudProofVariant explicit codec indexes Dec 5, 2024
@teor2345 teor2345 enabled auto-merge December 5, 2024 02:13
@teor2345 teor2345 requested a review from nazar-pc December 5, 2024 02:13
@teor2345 teor2345 added this pull request to the merge queue Dec 5, 2024
Merged via the queue into main with commit 6650fd0 Dec 5, 2024
8 checks passed
@teor2345 teor2345 deleted the fix-fraud-comment branch December 5, 2024 04:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants