simulation

package
v0.0.0-...-00bf0a9 Latest Latest
Warning

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

Go to latest
Published: Jan 10, 2023 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	InitialWars            = "initial_wars"
	MaxWars                = "max_wars"
	MaxNumberOfInitialWars = 100
	MaxNumberOfWars        = 100000
)

Simulation parameters constants

View Source
const (
	OpWeightMsgCreateWar = "op_weight_msg_create_war"
	OpWeightMsgEditWar   = "op_weight_msg_edit_war"
	OpWeightMsgBuy       = "op_weight_msg_buy"
	OpWeightMsgSell      = "op_weight_msg_sell"
	OpWeightMsgSwap      = "op_weight_msg_swap"

	DefaultWeightMsgCreateWar = 5
	DefaultWeightMsgEditWar   = 5
	DefaultWeightMsgBuy       = 100
	DefaultWeightMsgSell      = 100
	DefaultWeightMsgSwap      = 100
)

Simulation operation weights constants

Variables

This section is empty.

Functions

func DecodeStore

func DecodeStore(cdc *codec.Codec, kvA, kvB tmkv.Pair) string

DecodeStore unmarshals the KVPair's Value to the corresponding type

func GenInitialNumberOfWars

func GenInitialNumberOfWars(r *rand.Rand) (initialWars uint64)

GenInitialNumberOfWars randomized initial number of wars

func GenMaxNumberOfWars

func GenMaxNumberOfWars(r *rand.Rand) (maxWars uint64)

GenMaxNumberOfWars randomized max number of wars

func RandomizedGenState

func RandomizedGenState(simState *module.SimulationState)

RandomizedGenState generates a random GenesisState

func SimulateMsgCreateWar

func SimulateMsgCreateWar(ak auth.AccountKeeper) simulation.Operation

func WeightedOperations

func WeightedOperations(
	appParams simulation.AppParams, cdc *codec.Codec,
	ak auth.AccountKeeper, k keeper.Keeper,
) simulation.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