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 logic to be the same as in the spec actors #1292

Merged
merged 6 commits into from
Dec 7, 2021
Merged

Conversation

elmattic
Copy link
Contributor

@elmattic elmattic commented Nov 23, 2021

Summary of changes
Changes introduced in this pull request:

  • Fix logic to be the same as in the spec actors

Our implementation was using ::checked_sub which by definition always returns some value for BigInt types (no underflow or overflow is possible).

Reference issue to close (if applicable)

Closes #1267

Other information and links

BigInt::checked_sub impl:
https://github.com/rust-num/num-bigint/blob/num-bigint-0.3.3/src/bigint.rs#L988-L991

@noot noot merged commit bc29740 into main Dec 7, 2021
@noot noot deleted the elmattic/actors-review-F3 branch December 7, 2021 17:41
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.

F3: Market::subtract_with_minimum incorrect use of checked_sub
2 participants