* Update DefaultHistoricalEntries to 1000 * hist entries sims and comment on simapp * changelog and godoc * update sim param change * update default to 100 Co-authored-by: Federico Kunze <federico.kunze94@gmail.com> Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
36 lines
945 B
Go
36 lines
945 B
Go
package simulation
|
|
|
|
// DONTCOVER
|
|
|
|
import (
|
|
"fmt"
|
|
"math/rand"
|
|
|
|
"github.com/cosmos/cosmos-sdk/x/simulation"
|
|
|
|
simtypes "github.com/cosmos/cosmos-sdk/types/simulation"
|
|
"github.com/cosmos/cosmos-sdk/x/staking/types"
|
|
)
|
|
|
|
// ParamChanges defines the parameters that can be modified by param change proposals
|
|
// on the simulation
|
|
func ParamChanges(r *rand.Rand) []simtypes.ParamChange {
|
|
return []simtypes.ParamChange{
|
|
simulation.NewSimParamChange(types.ModuleName, string(types.KeyMaxValidators),
|
|
func(r *rand.Rand) string {
|
|
return fmt.Sprintf("%d", GenMaxValidators(r))
|
|
},
|
|
),
|
|
simulation.NewSimParamChange(types.ModuleName, string(types.KeyUnbondingTime),
|
|
func(r *rand.Rand) string {
|
|
return fmt.Sprintf("\"%d\"", GenUnbondingTime(r))
|
|
},
|
|
),
|
|
simulation.NewSimParamChange(types.ModuleName, string(types.KeyHistoricalEntries),
|
|
func(r *rand.Rand) string {
|
|
return fmt.Sprintf("%d", GetHistEntries(r))
|
|
},
|
|
),
|
|
}
|
|
}
|