refactor!: MsgSimulatorFn clean up (#19792)
This commit is contained in:
@@ -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")
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user