-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
Coin.IsGTE bad logic #27
Labels
Comments
Merged
sahith-narahari
pushed a commit
to vitwit/cosmos-sdk
that referenced
this issue
Apr 29, 2020
Anil/msg authorization
faddat
referenced
this issue
in notional-labs/cosmos-sdk
Dec 3, 2021
* Significantly lower number of heap allocations that should be required by events * Use EmitEvent instead of EmitEvents
joeabbey
referenced
this issue
in joeabbey/cosmos-sdk
Jan 21, 2022
* Significantly lower number of heap allocations that should be required by events * Use EmitEvent instead of EmitEvents
Raumo0
pushed a commit
to mapofzones/cosmos-sdk
that referenced
this issue
Feb 13, 2022
Thunnini
referenced
this issue
in Thunnini/cosmos-sdk
Feb 28, 2022
* Significantly lower number of heap allocations that should be required by events * Use EmitEvent instead of EmitEvents
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
https://github.com/tendermint/basecoin/blob/master/types/coin.go#L96-L102
assumptions
Orig code:
This function will incorrectly return false under the circumstance that coinA and coinB contain different coins but of an amount of zero. Under this circumstance diff != 0 because there are different coins, however
diff.IsPositive()
returns false because it's not positive it is zero. The fix is to simply replacediff.IsPositive()
withdiff.IsNonnegative()
The text was updated successfully, but these errors were encountered: