simulation

package
v7.0.1 Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2024 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

View Source
const (
	OpWeightMsgCreateReport          = "op_weight_msg_create_report"
	OpWeightMsgDeleteReport          = "op_weight_msg_delete_report"
	OpWeightMsgSupportStandardReason = "op_weight_msg_support_standard_reason"
	OpWeightMsgAddReason             = "op_weight_msg_add_reason"
	OpWeightMsgRemoveReason          = "op_weight_msg_remove_reason"

	DefaultGasValue = 200_000
)

Simulation operation weights constants

View Source
const (
	DefaultWeightMsgUpdateParams int = 100

	OpWeightMsgUpdateParams = "op_weight_msg_update_params" //nolint:gosec
)

Simulation operation weights constants

Variables

This section is empty.

Functions

func GetRandomMessage

func GetRandomMessage(r *rand.Rand) string

GetRandomMessage returns a random reporting message

func GetRandomReasonDescription

func GetRandomReasonDescription(r *rand.Rand) string

GetRandomReasonDescription returns a random reason description

func GetRandomReasonTitle

func GetRandomReasonTitle(r *rand.Rand) string

GetRandomReasonTitle returns a random reason title

func GetRandomStandardReasons

func GetRandomStandardReasons(r *rand.Rand, num int) []types.StandardReason

GetRandomStandardReasons returns a randomly generated slice of standard reason

func NewDecodeStore

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

NewDecodeStore returns a new decoder that unmarshals the KVPair's Value to the corresponding reports type

func ProposalMsgs

func ProposalMsgs() []simtypes.WeightedProposalMsg

ProposalMsgs defines the module weighted proposals' contents

func RandomReason

func RandomReason(r *rand.Rand, reasons []types.Reason) types.Reason

RandomReason returns a random reason from the given slice

func RandomReport

func RandomReport(r *rand.Rand, reports []types.Report) types.Report

RandomReport returns a random report from the given slice

func RandomStandardReason

func RandomStandardReason(r *rand.Rand, reasons []types.StandardReason) types.StandardReason

RandomStandardReason returns a random standard reason from the given slice

func RandomizeGenState

func RandomizeGenState(simState *module.SimulationState)

RandomizeGenState generates a random GenesisState for subspaces

func SimulateMsgAddReason

SimulateMsgAddReason tests and runs a single MsgAddReason

func SimulateMsgCreateReport

SimulateMsgCreateReport tests and runs a single MsgCreateReport

func SimulateMsgDeleteReport

SimulateMsgDeleteReport tests and runs a single msg delete subspace

func SimulateMsgRemoveReason

SimulateMsgRemoveReason tests and runs a single MsgRemoveReason

func SimulateMsgSupportStandardReason

func SimulateMsgSupportStandardReason(
	k keeper.Keeper, sk types.SubspacesKeeper,
	ak authkeeper.AccountKeeper, bk bankkeeper.Keeper,
) simtypes.Operation

SimulateMsgSupportStandardReason tests and runs a single MsgSupportStandardReason

func SimulateMsgUpdateParams

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

SimulateMsgUpdateParams returns a random MsgUpdateParams

func WeightedOperations

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

Types

This section is empty.

Jump to

Keyboard shortcuts

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