-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
Add check before minting empty coins #4681
Conversation
Codecov Report
@@ Coverage Diff @@
## master #4681 +/- ##
==========================================
+ Coverage 53.99% 54.04% +0.05%
==========================================
Files 271 271
Lines 17258 17256 -2
==========================================
+ Hits 9318 9326 +8
+ Misses 7255 7251 -4
+ Partials 685 679 -6 |
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.
Added some feedback. Also, I believe this warrants a pending log entry...it's kind of a bug fix.
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.
ACK
The previous function for inflating the supply on the mint module,
InflateSupply
wasn't checking for neg amounts, nor 0 amounts. The first is already checked onmint
due to the fact that we useNewCoin
to initialize the coins from theBlockProvision
. This PR fixes the second one where a consensus failure was caused if the minted coins where empty.Note that this check also exists for the two
burn
functions instaking/keeper/pool.go
.Fix on Gaia: cosmos/gaia#56
cc: @rigelrozanski @alexanderbez
here's the prev
InflateSupply
:Targeted PR against correct branch (see CONTRIBUTING.md)
Linked to github-issue with discussion and accepted design OR link to spec that describes this work.
Wrote tests
Updated relevant documentation (
docs/
)Added a relevant changelog entry:
clog add [section] [stanza] [message]
rereviewed
Files changed
in the github PR explorerFor Admin Use: