-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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: sdk.Coins.Add #14715
fix: sdk.Coins.Add #14715
Conversation
Could you add a changelog and fix the remaining tests? |
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.
lgtm, pending #14715 (comment).
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.
few nits, pending failing tests
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.
lgtm, need to fix non-determinism test
@robert-zaremba could you still add a changelog? |
Co-authored-by: Julien Robert <julien@rbrt.fr> (cherry picked from commit 32bb7f6) # Conflicts: # CHANGELOG.md
I was just about to add that changelog. Thanks @julienrbrt |
Description
sdk.Coins.Add
, today the function returnsnil
, if the result will end up with an empty set of coins. I've added few test to confirm that and a fix.Empty
set != nil.nil
is a bad practice, because using that object will lead to panics.sdk.Coins.Sub
to confirm that everything works. well.Technically the PR is API changing , because we change the return value for given parameters. However, I think it goes into the bug fixes so we should backport it to 0.47 and 0.46. So tentatively adding the backport labels.
Author Checklist
All items are required. Please add a note to the item if the item is not applicable and
please add links to any relevant follow up issues.
I have...
!
to the type prefix if API or client breaking changeCHANGELOG.md
Reviewers Checklist
All items are required. Please add a note if the item is not applicable and please add
your handle next to the items reviewed if you only reviewed selected items.
I have...
!
in the type prefix if API or client breaking change