-
Notifications
You must be signed in to change notification settings - Fork 230
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
Protect uint256 plain integer math #409
Protect uint256 plain integer math #409
Conversation
The approach of returning a straight zero when the numerator is zero seems sound. Confirming discussions on Slack:
OK to merge once this full reparse with |
Just as a heads up - this passed the checkpoint for 420,000 just fine. I'm currently syncing the last 1000 or so blocks until it's up to date so I can compare the hashes for the latest block against 0.0.11-rc2 (before we changed this). I fully expect them to match, it's just another sanity check. |
Awesome, thanks for the detailed testing! |
0.0.11.1
0.0.11-rc2
All good on the final test. I also don't usually use these calls interactively so didn't notice the extra |
b9b88d1 DivideAndRoundUp protection (dexX7)
Currently there may be an overflow-ish issue when dividing and rounding up certain numbers.
This pull request adds a test for this case, and protects against it, by expecialy checking, wheter the numerator is zero.
This resolves #408.