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

fix: handle 0 for inverting eip155 parity. #633

Merged
merged 1 commit into from
May 24, 2024

Conversation

jafar75
Copy link
Contributor

@jafar75 jafar75 commented May 23, 2024

Motivation

As mentioned in #630 , there is a corner case for inverting parity with value of Eip155(0). Program will try to return Eip155(-1) which is panic issue.

Solution

One should handle the 0 case separately and return Eip155(1) as the inverted output.

PR Checklist

  • Added Tests
  • Added Documentation
  • Breaking changes

@prestwich prestwich linked an issue May 23, 2024 that may be closed by this pull request
@prestwich
Copy link
Member

CI is unrelated

@prestwich prestwich merged commit 5bfc676 into alloy-rs:main May 24, 2024
27 of 30 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug] Panic in Parity::inverted
2 participants