-
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
R4R Run missing invariants during simulations #4080
Conversation
Codecov Report
@@ Coverage Diff @@
## develop #4080 +/- ##
===========================================
- Coverage 59.98% 59.95% -0.04%
===========================================
Files 212 211 -1
Lines 15123 15111 -12
===========================================
- Hits 9072 9060 -12
Misses 5431 5431
Partials 620 620 |
@@ -39,3 +39,12 @@ func (k *Keeper) RegisterRoute(moduleName, route string, invar sdk.Invariant) { | |||
func (k Keeper) Routes() []InvarRoute { | |||
return k.routes | |||
} | |||
|
|||
// return all the invariants | |||
func (k Keeper) Invariants() []sdk.Invariant { |
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.
Can we have a unit test for just this function?
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 gracefully decline, I really can't see how this is useful whatsoever, I'll add a // DONTCOVER
though
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.
Just a minor remark - looks good otherwise
simulation.PeriodicInvariant(staking.AllInvariants(app.stakingKeeper, app.feeCollectionKeeper, | ||
app.distrKeeper, app.accountKeeper), period, 0), | ||
} | ||
return simulation.PeriodicInvariants(app.crisisKeeper.Invariants(), period, 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.
++
just noticed there were a bunch of missing simulatulations in some moreless hidden code ;)
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:
sdkch add [section] [stanza] [message]
rereviewed
Files changed
in the github PR explorerFor Admin Use: