-
Notifications
You must be signed in to change notification settings - Fork 772
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
tx/vm/util: throw when provided negative BN #1606
Conversation
Codecov Report
Flags with carried forward coverage won't be shown. Click here to find out more. |
72aa5a9
to
7061f77
Compare
i'm seeing uses of both "can not" and "cannot" in this PR, let's just use "cannot"
|
lgtm! will wait if you want to try to add a negative value tx to runTx (using value=0 and |
Co-authored-by: Ryan Ghods <ryan@ryanio.com>
…/ethereumjs/ethereumjs-monorepo into vm/tx/remove-negative-bn-support
Co-authored-by: Ryan Ghods <ryan@ryanio.com>
…/ethereumjs/ethereumjs-monorepo into vm/tx/remove-negative-bn-support
Co-authored-by: Ryan Ghods <ryan@ryanio.com>
Co-authored-by: Ryan Ghods <ryan@ryanio.com>
Co-authored-by: Ryan Ghods <ryan@ryanio.com>
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 great! can merge after ci passes
This PR resolves #1513 with the following changes:
As mentioned in a comment of the above issue, the
toBuffer
method also has the side effect of converting negative BN to positive BN. I decided to throw an error in the case of negative BN in that method, since it seemed to me like that behavior isn't intended.I was not sure about disabling negative BNs at the module level, so omitted that for now.