simulation

package
v1.17.0 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2023 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TriggerID        = "trigger_id"
	QueueStart       = "trigger_queue_start"
	NumIniTrig       = "num_ini_trig"
	NumIniTrigQueued = "num_ini_trig_queued"
	Triggers         = "triggers"
	QueuedTriggers   = "queued_triggers"
	GasLimits        = "trigger_gas_limits"
)
View Source
const (
	//nolint:gosec // not credentials
	OpWeightMsgCreateTrigger = "op_weight_msg_create_trigger"
	//nolint:gosec // not credentials
	OpWeightMsgDestroyTrigger = "op_weight_msg_destroy_trigger"
)

Simulation operation weights constants

Variables

This section is empty.

Functions

func Dispatch

Dispatch sends an operation to the chain using a given account/funds on account for fees. Failures on the server side are handled as no-op msg operations with the error string as the status/response.

func NewDecodeStore

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

NewDecodeStore returns a decoder function closure that unmarshalls the KVPair's Value

func NewRandomAction

func NewRandomAction(r *rand.Rand, from string, to string) sdk.Msg

NewRandomAction returns a random action

func NewRandomEvent

func NewRandomEvent(r *rand.Rand, now time.Time) types.TriggerEventI

NewRandomEvent returns a random event

func NewRandomGasLimit

func NewRandomGasLimit(r *rand.Rand) uint64

NewRandomGasLimit randomized Gas Limit

func NewRandomQueuedTrigger

func NewRandomQueuedTrigger(r *rand.Rand, simState *module.SimulationState, accs []simtypes.Account, id types.TriggerID) types.QueuedTrigger

NewRandomQueuedTrigger returns a random queued trigger

func NewRandomTrigger

func NewRandomTrigger(r *rand.Rand, simState *module.SimulationState, accs []simtypes.Account, id types.TriggerID) types.Trigger

NewRandomTrigger returns a random trigger

func QueueStartFn

func QueueStartFn(r *rand.Rand) uint64

QueueStartFn randomized Queue Start Index

func RandomAccs

func RandomAccs(r *rand.Rand, accs []simtypes.Account, count uint64) ([]simtypes.Account, error)

func RandomGasLimits

func RandomGasLimits(r *rand.Rand, triggers []types.Trigger, queuedTriggers []types.QueuedTrigger) []types.GasLimit

RandomGasLimits generates random gas limits for all the provided triggers and queued triggers.

func RandomNewQueuedTriggers

func RandomNewQueuedTriggers(r *rand.Rand, simState *module.SimulationState, accs []simtypes.Account, queuedTriggerIds []uint64) []types.QueuedTrigger

RandomNewQueuedTriggers generates a random queued trigger for each provided id.

func RandomNewTriggers

func RandomNewTriggers(r *rand.Rand, simState *module.SimulationState, accs []simtypes.Account, triggerIDs []uint64) []types.Trigger

RandomNewTriggers generates a random trigger for each provided id.

func RandomizedGenState

func RandomizedGenState(simState *module.SimulationState)

RandomizedGenState generates a random GenesisState for trigger

func SimulateMsgCreateTrigger

func SimulateMsgCreateTrigger(_ keeper.Keeper, ak authkeeper.AccountKeeperI, bk bankkeeper.Keeper) simtypes.Operation

SimulateMsgCreateTrigger sends a MsgCreateTriggerRequest.

func SimulateMsgDestroyTrigger

func SimulateMsgDestroyTrigger(k keeper.Keeper, ak authkeeper.AccountKeeperI, bk bankkeeper.Keeper) simtypes.Operation

SimulateMsgDestroyTrigger sends a MsgDestroyTriggerRequest.

func TriggerIDStartFn

func TriggerIDStartFn(r *rand.Rand) uint64

TriggerIDStartFn randomized starting trigger id

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