-
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
x/cap: fix comments, SetIndex, and some tests #7845
Conversation
Codecov Report
@@ Coverage Diff @@
## master #7845 +/- ##
==========================================
- Coverage 54.24% 54.23% -0.02%
==========================================
Files 609 609
Lines 38804 38807 +3
==========================================
- Hits 21049 21046 -3
- Misses 15601 15604 +3
- Partials 2154 2157 +3 |
latest := k.GetLatestIndex(ctx) | ||
if latest > 0 { |
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.
nit
latest := k.GetLatestIndex(ctx) | |
if latest > 0 { | |
if latest := k.GetLatestIndex(ctx); latest > 0 { |
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.
There isn't even a need to store this in a variable.
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.
I kind of prefer the clarity of how its written currently for symmetry with the other index
value being evaluated.
Co-authored-by: Alessio Treglia <[email protected]>
Surfaced from Informal Systems IBC Audit of cosmos-sdk hash 82f15f3.
Description
Fixes comments and some tests and add's more constraints to SetIndex per #7805
Before we can merge this PR, please make sure that all the following items have been
checked off. If any of the checklist items are not applicable, please leave them but
write a little note why.
docs/
) or specification (x/<module>/spec/
)godoc
comments.Unreleased
section inCHANGELOG.md
Files changed
in the Github PR explorerCodecov Report
in the comment section below once CI passes