2019-08-28 07:58:25 -07:00
|
|
|
package simulation
|
|
|
|
|
|
|
|
// DONTCOVER
|
|
|
|
|
|
|
|
import (
|
2020-08-26 02:39:38 -07:00
|
|
|
"encoding/json"
|
2019-08-28 07:58:25 -07:00
|
|
|
"fmt"
|
|
|
|
"math/rand"
|
|
|
|
|
|
|
|
"github.com/cosmos/cosmos-sdk/x/simulation"
|
2020-03-23 04:55:44 -07:00
|
|
|
|
|
|
|
simtypes "github.com/cosmos/cosmos-sdk/types/simulation"
|
|
|
|
"github.com/cosmos/cosmos-sdk/x/bank/types"
|
2019-08-28 07:58:25 -07:00
|
|
|
)
|
|
|
|
|
|
|
|
// ParamChanges defines the parameters that can be modified by param change proposals
|
|
|
|
// on the simulation
|
2020-03-23 04:55:44 -07:00
|
|
|
func ParamChanges(r *rand.Rand) []simtypes.ParamChange {
|
|
|
|
return []simtypes.ParamChange{
|
2020-07-08 10:43:08 -07:00
|
|
|
simulation.NewSimParamChange(types.ModuleName, string(types.KeySendEnabled),
|
|
|
|
func(r *rand.Rand) string {
|
2020-08-26 02:39:38 -07:00
|
|
|
paramsBytes, err := json.Marshal(RandomGenesisSendParams(r))
|
|
|
|
if err != nil {
|
|
|
|
panic(err)
|
|
|
|
}
|
|
|
|
return fmt.Sprintf("%s", paramsBytes)
|
2020-07-08 10:43:08 -07:00
|
|
|
},
|
|
|
|
),
|
|
|
|
simulation.NewSimParamChange(types.ModuleName, string(types.KeyDefaultSendEnabled),
|
2019-08-28 07:58:25 -07:00
|
|
|
func(r *rand.Rand) string {
|
2020-07-08 10:43:08 -07:00
|
|
|
return fmt.Sprintf("%v", RandomGenesisDefaultSendParam(r))
|
2019-08-28 07:58:25 -07:00
|
|
|
},
|
|
|
|
),
|
|
|
|
}
|
|
|
|
}
|