Revert function signature change for NewMsgSubmitProposal
sunnya97 opened this issue · 1 comments
Background
As part of #240, we changed the function signature of the govtypes.NewMsgSubmitProposal from:
NewMsgSubmitProposal(content Content, initialDeposit sdk.Coins, proposer sdk.AccAddress)
to
NewMsgSubmitProposal(content Content, initialDeposit sdk.Coins, proposer sdk.AccAddress, IsExpedited bool)
in order to allow the creation of expedited proposals. However, because the IsExpedited boolean is required, it breaks all the existing usages of NewMsgSubmitProposal, which is annoying because many of the usages of this function are from other repos that we don't maintain such as ibc-go and wasmd, and as such we would be required to create forks of all of these.
Suggested Design
I suggest we either make the IsExpedited parameter optional and defaulted to false (I'm not sure if there's a way to do this in Go).
If that is not possible, we should revert the function signature to the original form, and just create a new function called govtypes.NewExpeditedMsgSubmitProposal
that can be called when needed to create an expedited proposal
Acceptance Criteria
goals & criteria for success
(for example)
- all existing and new tests should pass
Nice catch! I'm a bit confused why osmosis main is compiling rn, is expedited not on its branch rn?
Yeah the constructor change was an API break that probably shouldn't have happened. Lets make a second constructor as you suggested, and restore prior functionality. (Params with defaults don't exist in golang. This is what the .With...
design pattern or function param setting design pattern is for)
Per DM convo, assigning to you