simulation

package
v3.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 9, 2024 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultWeightMsgRegisterOperator          int = 80
	DefaultWeightMsgUpdateOperator            int = 40
	DefaultWeightMsgDeactivateOperator        int = 20
	DefaultWeightMsgReactivateOperator        int = 30
	DefaultWeightMsgTransferOperatorOwnership int = 10
	DefaultWeightMsgDeleteOperator            int = 25
	DefaultWeightMsgSetOperatorParams         int = 10

	OperationWeightMsgRegisterOperator          = "op_weight_msg_register_operator"
	OperationWeightMsgDeactivateOperator        = "op_weight_msg_deactivate_operator"
	OperationWeightMsgUpdateOperator            = "op_weight_msg_update_operator"
	OperationWeightMsgReactivateOperator        = "op_weight_msg_reactivate_operator"
	OperationWeightMsgTransferOperatorOwnership = "op_weight_msg_transfer_operator_ownership"
	OperationWeightMsgDeleteOperator            = "op_weight_msg_delete_operator"
	OperationWeightMsgSetOperatorParams         = "op_weight_msg_set_operator_params"
)

Simulation operation weights constants

View Source
const (
	DefaultWeightMsgUpdateParams = 30

	OperationWeightMsgUpdateParams = "op_weight_msg_update_params"
)

Variables

This section is empty.

Functions

func GetRandomExistingOperator

func GetRandomExistingOperator(r *rand.Rand, ctx context.Context, k *keeper.Keeper, filter func(operator types.Operator) bool) (types.Operator, bool)

GetRandomExistingOperator returns a random existing operator

func NewDecodeStore

func NewDecodeStore(keeper *keeper.Keeper) func(kvA kv.Pair, kvB kv.Pair) string

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

func ProposalMsgs

func ProposalMsgs(stakingKeeper *stakingkeeper.Keeper) []simtypes.WeightedProposalMsg

func RandomOperator

func RandomOperator(r *rand.Rand, accounts []simtypes.Account) types.Operator

RandomOperator returns a random operator

func RandomOperatorParams

func RandomOperatorParams(r *rand.Rand) types.OperatorParams

RandomOperatorParams returns random operator params

func RandomParams

func RandomParams(r *rand.Rand, stakeDenom string) types.Params

RandomParams returns random params

func RandomizedGenState

func RandomizedGenState(simState *module.SimulationState)

RandomizedGenState generates a random GenesisState for the operators module

func SimulateMsgUpdateParams

func SimulateMsgUpdateParams(stakingKeeper *stakingkeeper.Keeper) func(r *rand.Rand, _ sdk.Context, _ []simtypes.Account) sdk.Msg

SimulateMsgUpdateParams returns a random MsgUpdateParams

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL