simulation

package
v4.7.0 Latest Latest
Warning

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

Go to latest
Published: Dec 7, 2022 License: Apache-2.0 Imports: 27 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 #nosec G101 -- This is a false positive

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 ParamChanges

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

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 subspaceskeeper.Keeper,
	ak authkeeper.AccountKeeper, bk bankkeeper.Keeper, fk feeskeeper.Keeper,
) simtypes.Operation

SimulateMsgSupportStandardReason tests and runs a single MsgSupportStandardReason

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