-
Notifications
You must be signed in to change notification settings - Fork 608
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 minor comment for superfluid reward distr #1104
Conversation
@ValarDragon Fixed in addition to couple fixes! |
Codecov Report
@@ Coverage Diff @@
## main #1104 +/- ##
=======================================
Coverage 20.70% 20.70%
=======================================
Files 194 194
Lines 25259 25259
=======================================
Hits 5231 5231
Misses 19069 19069
Partials 959 959 Continue to review full report at Codecov.
|
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 once linter passes.
We may need to do var valAddr []byte
, and remove the ineffassign , or add a nolint
app/apptesting/test_suite.go
Outdated
} | ||
|
||
func (keeperTestHelper *KeeperTestHelper) BeginNewBlockWithProposer(executeNextEpoch bool, proposer sdk.ValAddress) { | ||
valAddr := []byte(":^) at this distribution workaround") |
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.
What's the context behind this, just curious?
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.
oh it was referring to it being hard to simply simulate an app.go begin block for tests (thats what all this function is doing) It was a super late night for superfluid staking, trying to get this test working lol, we should probably delete the message.
e.g. this + the last commit info was really confusing to get working (distribution would panic w/o a clear message if it wasn't present)
valAddr := []byte(":^) at this distribution workaround") //nolint
validators := keeperTestHelper.App.StakingKeeper.GetAllValidators(keeperTestHelper.Ctx)
if len(validators) >= 1 {
valAddrFancy, err := validators[0].GetConsAddr()
keeperTestHelper.Require().NoError(err)
valAddr = valAddrFancy.Bytes()
} else {
valAddrFancy := keeperTestHelper.SetupValidator(stakingtypes.Bonded)
validator, _ := keeperTestHelper.App.StakingKeeper.GetValidator(keeperTestHelper.Ctx, valAddrFancy)
valAddr2, _ := validator.GetConsAddr()
valAddr = valAddr2.Bytes()
}valAddr := []byte(":^) at this distribution workaround") //nolint
validators := keeperTestHelper.App.StakingKeeper.GetAllValidators(keeperTestHelper.Ctx)
if len(validators) >= 1 {
valAddrFancy, err := validators[0].GetConsAddr()
keeperTestHelper.Require().NoError(err)
valAddr = valAddrFancy.Bytes()
} else {
valAddrFancy := keeperTestHelper.SetupValidator(stakingtypes.Bonded)
validator, _ := keeperTestHelper.App.StakingKeeper.GetValidator(keeperTestHelper.Ctx, valAddrFancy)
valAddr2, _ := validator.GetConsAddr()
valAddr = valAddr2.Bytes()
}
Description
Cref: #1070 (comment)
For contributor use:
docs/
) or specification (x/<module>/spec/
)Unreleased
section inCHANGELOG.md
Files changed
in the Github PR explorer