refactor!: MsgSimulatorFn clean up (#19792)

This commit is contained in:
Julián Toledano
2024-03-20 10:21:00 +00:00
committed by GitHub
parent 3ed9f7fc69
commit 0c2decd7cd
23 changed files with 29 additions and 36 deletions
+1 -1
View File
@@ -28,7 +28,7 @@ func ProposalMsgs() []simtypes.WeightedProposalMsg {
}
}
func SimulateMsgCommunityPoolSpend(r *rand.Rand, _ sdk.Context, _ []simtypes.Account, _ coreaddress.Codec) (sdk.Msg, error) {
func SimulateMsgCommunityPoolSpend(r *rand.Rand, _ []simtypes.Account, _ coreaddress.Codec) (sdk.Msg, error) {
// use the default gov module account address as authority
var authority sdk.AccAddress = address.Module("gov")
+1 -2
View File
@@ -20,7 +20,6 @@ func TestProposalMsgs(t *testing.T) {
s := rand.NewSource(1)
r := rand.New(s)
ctx := sdk.NewContext(nil, true, nil)
accounts := simtypes.RandomAccounts(r, 3)
// execute ProposalMsgs function
@@ -33,7 +32,7 @@ func TestProposalMsgs(t *testing.T) {
assert.Equal(t, simulation.OpWeightMsgCommunityPoolSpend, w0.AppParamsKey())
assert.Equal(t, simulation.DefaultWeightMsgCommunityPoolSpend, w0.DefaultWeight())
msg, err := w0.MsgSimulatorFn()(r, ctx, accounts, codectestutil.CodecOptions{}.GetAddressCodec())
msg, err := w0.MsgSimulatorFn()(r, accounts, codectestutil.CodecOptions{}.GetAddressCodec())
assert.NilError(t, err)
msgCommunityPoolSpend, ok := msg.(*pooltypes.MsgCommunityPoolSpend)
assert.Assert(t, ok)