-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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: remove .Type()
and .Route()
from msgs (backport #14751)
#15470
Conversation
(cherry picked from commit 8dbdfea) # Conflicts: # CHANGELOG.md # x/distribution/types/msg.go # x/evidence/types/msgs.go # x/gov/client/utils/query_test.go # x/gov/simulation/operations.go # x/gov/simulation/operations_test.go # x/gov/types/v1/msgs.go # x/staking/simulation/operations_test.go
@@ -230,7 +229,7 @@ func SimulateMsgFundCommunityPool(txConfig client.TxConfig, ak types.AccountKeep | |||
if !hasNeg { | |||
fees, err = simtypes.RandomFees(r, ctx, coins) | |||
if err != nil { | |||
return simtypes.NoOpMsg(types.ModuleName, types.TypeMsgFundCommunityPool, "unable to generate fees"), nil, err | |||
return simtypes.NoOpMsg(types.ModuleName, sdk.MsgTypeURL(&types.MsgFundCommunityPool{}), "unable to generate fees"), nil, err |
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.
this seems api breaking for testing. @julienrbrt i saw you tagged as backport to 0.47.1. is there good reasoning to do it here?
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 should not be any behavior change, actually. We update our tests, and clean-up the code.
I don't think it is breaking (route() and type() were always the msg urls), moreover, chains on v0.47 won't use Route() and Type(). So it is an improvement on simulations.
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.
hmm, its api breaking in the sense that it requires users to upgrade code instead of using a newer version and releasing, or does a user not need to make these changes?. I dont see much benefit to backporting this. Are you fine with closing if the above lines are required
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.
No, a user does not need to make these changes. However, I do agree what apart from cleaning up, it isn't needed.
So let's close, v0.48 will be cleaner.
You have successfully added a new gosec configuration |
This is an automatic backport of pull request #14751 done by Mergify.
Cherry-pick of 8dbdfea has failed:
To fix up this pull request, you can check it out locally. See documentation: https://docs.github.com/en/github/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally
Mergify commands and options
More conditions and actions can be found in the documentation.
You can also trigger Mergify actions by commenting on this pull request:
@Mergifyio refresh
will re-evaluate the rules@Mergifyio rebase
will rebase this PR on its base branch@Mergifyio update
will merge the base branch into this PR@Mergifyio backport <destination>
will backport this PR on<destination>
branchAdditionally, on Mergify dashboard you can:
Finally, you can contact us on https://mergify.com