simulation

package
v1.20.3 Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const HoldAccountHolds = "hold-account-holds"

Variables

This section is empty.

Functions

func NewDecodeStore

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

NewDecodeStore returns a decoder function closure that unmarshals the KVPair's Value to the corresponding group type.

func RandomAccountHolds

func RandomAccountHolds(r *rand.Rand, accounts []simtypes.Account) []*hold.AccountHold

RandomAccountHolds randomly selects accounts with an existing balance to place a hold of a random amount.

func RandomizedGenState

func RandomizedGenState(simState *module.SimulationState)

RandomizedGenState generates a random GenesisState for the hold module.

func UpdateBankGenStateForHolds

func UpdateBankGenStateForHolds(bankGenState *banktypes.GenesisState, holdGenState *hold.GenesisState)

UpdateBankGenStateForHolds adds all hold funds to the bank balances. Panics if there's an address with a hold that doesn't already have a balance.

Types

This section is empty.

Jump to

Keyboard shortcuts

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