simulation

package
v0.0.0-...-4ed9d07 Latest Latest
Warning

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

Go to latest
Published: Sep 29, 2020 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	InitialBonds            = "initial_bonds"
	MaxBonds                = "max_bonds"
	MaxNumberOfInitialBonds = 100
	MaxNumberOfBonds        = 100000
)

Simulation parameters constants

View Source
const (
	OpWeightMsgCreateBond = "op_weight_msg_create_bond"
	OpWeightMsgEditBond   = "op_weight_msg_edit_bond"
	OpWeightMsgBuy        = "op_weight_msg_buy"
	OpWeightMsgSell       = "op_weight_msg_sell"
	OpWeightMsgSwap       = "op_weight_msg_swap"

	DefaultWeightMsgCreateBond = 5
	DefaultWeightMsgEditBond   = 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 GenInitialNumberOfBonds

func GenInitialNumberOfBonds(r *rand.Rand) (initialBonds uint64)

GenInitialNumberOfBonds randomized initial number of bonds

func GenMaxNumberOfBonds

func GenMaxNumberOfBonds(r *rand.Rand) (maxBonds uint64)

GenMaxNumberOfBonds randomized max number of bonds

func RandomizedGenState

func RandomizedGenState(simState *module.SimulationState)

RandomizedGenState generates a random GenesisState

func SimulateMsgCreateBond

func SimulateMsgCreateBond(ak auth.AccountKeeper) simulation.Operation

func SimulateMsgEditBond

func SimulateMsgEditBond(ak auth.AccountKeeper, k keeper.Keeper) 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