-
Notifications
You must be signed in to change notification settings - Fork 609
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
Query lockup params #3098
Query lockup params #3098
Changes from 4 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,6 +9,7 @@ import ( | |
// InitGenesis initializes the capability module's state from a provided genesis | ||
// state. | ||
func (k Keeper) InitGenesis(ctx sdk.Context, genState types.GenesisState) { | ||
k.SetParams(ctx, types.DefaultParams()) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. oh wow, thanks! |
||
k.SetLastLockID(ctx, genState.LastLockId) | ||
if err := k.InitializeAllLocks(ctx, genState.Locks); err != nil { | ||
return | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -513,3 +513,10 @@ func (suite *KeeperTestSuite) TestLockedDenom() { | |
testTotalLockedDuration("2h", 0) | ||
testTotalLockedDuration("1h", 10) | ||
} | ||
|
||
func (suite *KeeperTestSuite) TestParams() { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can we add test cases for setting params and then querying it? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah sure |
||
suite.SetupTest() | ||
res, err := suite.querier.Params(sdk.WrapSDKContext(suite.Ctx), &types.QueryParamsRequest{}) | ||
suite.Require().NoError(err) | ||
suite.Require().Equal([]string(nil), res.Params.ForceUnlockAllowedAddresses) | ||
} |
Large diffs are not rendered by default.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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.
good catch!