-
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
refactor(distribution)!: use collections for params state #16211
Conversation
x/distribution/keeper/params.go
Outdated
bz, err := store.Get(types.ParamsKey) | ||
if bz == nil || err != nil { | ||
func (k Keeper) GetParams(ctx context.Context) (types.Params, error) { | ||
params, err := k.Params.Get(ctx) |
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 think this function can be shorthanded to just return return k.Params.Get
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!
CHANGELOG.md
Outdated
@@ -211,6 +211,8 @@ Ref: https://keepachangelog.com/en/1.0.0/ | |||
* `simulation.NewOperationMsg` is now 2-arity instead of 3-arity with the obsolete argument `codec.ProtoCodec` removed. | |||
* The field `OperationMsg.Msg` is now of type `[]byte` instead of `json.RawMessage`. | |||
|
|||
* (x/distribution)[#16211](https://github.com/cosmos/cosmos-sdk/pull/16211) Use collections for params state management. |
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 space between the package and the PR and no need the space L213.
Closes: #16210
Author Checklist
All items are required. Please add a note to the item if the item is not applicable and
please add links to any relevant follow up issues.
I have...
!
to the type prefix if API or client breaking changeCHANGELOG.md
Reviewers Checklist
All items are required. Please add a note if the item is not applicable and please add
your handle next to the items reviewed if you only reviewed selected items.
I have...
!
in the type prefix if API or client breaking change