cosmos-sdk: github.com/cosmos/cosmos-sdk/x/staking/simulation Index | Files

package simulation

import "github.com/cosmos/cosmos-sdk/x/staking/simulation"

Index

Package Files

decoder.go genesis.go operations.go params.go

Constants

const (
    OpWeightMsgCreateValidator = "op_weight_msg_create_validator"
    OpWeightMsgEditValidator   = "op_weight_msg_edit_validator"
    OpWeightMsgDelegate        = "op_weight_msg_delegate"
    OpWeightMsgUndelegate      = "op_weight_msg_undelegate"
    OpWeightMsgBeginRedelegate = "op_weight_msg_begin_redelegate"
)

Simulation operation weights constants

func GenMaxValidators Uses

func GenMaxValidators(r *rand.Rand) (maxValidators uint32)

GenMaxValidators randomized MaxValidators

func GenUnbondingTime Uses

func GenUnbondingTime(r *rand.Rand) (ubdTime time.Duration)

GenUnbondingTime randomized UnbondingTime

func GetHistEntries Uses

func GetHistEntries(r *rand.Rand) uint32

GetHistEntries randomized HistoricalEntries between 0-100.

func NewDecodeStore Uses

func NewDecodeStore(cdc codec.Marshaler) func(kvA, kvB kv.Pair) string

NewDecodeStore returns a decoder function closure that unmarshals the KVPair's Value to the corresponding staking type.

func ParamChanges Uses

func ParamChanges(r *rand.Rand) []simtypes.ParamChange

ParamChanges defines the parameters that can be modified by param change proposals on the simulation

func RandomizedGenState Uses

func RandomizedGenState(simState *module.SimulationState)

RandomizedGenState generates a random GenesisState for staking

func SimulateMsgBeginRedelegate Uses

func SimulateMsgBeginRedelegate(ak types.AccountKeeper, bk types.BankKeeper, k keeper.Keeper) simtypes.Operation

SimulateMsgBeginRedelegate generates a MsgBeginRedelegate with random values nolint: interfacer

func SimulateMsgCreateValidator Uses

func SimulateMsgCreateValidator(ak types.AccountKeeper, bk types.BankKeeper, k keeper.Keeper) simtypes.Operation

SimulateMsgCreateValidator generates a MsgCreateValidator with random values nolint: interfacer

func SimulateMsgDelegate Uses

func SimulateMsgDelegate(ak types.AccountKeeper, bk types.BankKeeper, k keeper.Keeper) simtypes.Operation

SimulateMsgDelegate generates a MsgDelegate with random values nolint: interfacer

func SimulateMsgEditValidator Uses

func SimulateMsgEditValidator(ak types.AccountKeeper, bk types.BankKeeper, k keeper.Keeper) simtypes.Operation

SimulateMsgEditValidator generates a MsgEditValidator with random values nolint: interfacer

func SimulateMsgUndelegate Uses

func SimulateMsgUndelegate(ak types.AccountKeeper, bk types.BankKeeper, k keeper.Keeper) simtypes.Operation

SimulateMsgUndelegate generates a MsgUndelegate with random values nolint: interfacer

func WeightedOperations Uses

func WeightedOperations(
    appParams simtypes.AppParams, cdc codec.JSONMarshaler, ak types.AccountKeeper,
    bk types.BankKeeper, k keeper.Keeper,
) simulation.WeightedOperations

WeightedOperations returns all the operations from the module with their respective weights

Package simulation imports 15 packages (graph) and is imported by 1 packages. Updated 2020-08-13. Refresh now. Tools for package owners.