Versions in this module Expand all Collapse all v11 v11.0.0 Aug 29, 2022 Changes in this version + const AverageBlockTime + const BeginBlockEntryKind + const EndBlockEntryKind + const MsgEntryKind + const QueuedMsgEntryKind + var FlagAllInvariantsValue bool + var FlagBlockSizeValue int + var FlagCommitValue bool + var FlagEnabledValue bool + var FlagExportParamsHeightValue int + var FlagExportParamsPathValue string + var FlagExportStatePathValue string + var FlagExportStatsPathValue string + var FlagGenesisFileValue string + var FlagGenesisTimeValue int64 + var FlagInitialBlockHeightValue int + var FlagLeanValue bool + var FlagNumBlocksValue int + var FlagOnOperationValue bool + var FlagParamsFileValue string + var FlagPeriodValue uint + var FlagSeedValue int64 + var FlagVerboseValue bool + var FlagWriteStatsToDB bool + func GetSimulatorFlags() + func PrintStats(db dbm.DB) + func RandomRequestBeginBlock(r *rand.Rand, params Params, validators mockValidators, pastTimes []time.Time, ...) abci.RequestBeginBlock + func RandomSimAccounts(r *rand.Rand, n int) []simulation.Account + func SimulateFromSeed(tb testing.TB, w io.Writer, app simtypes.App, initFunctions InitFunctions, ...) (stopEarly bool, err error) + type AppStateFn func(r *rand.Rand, accs []simtypes.Account, config Config) (appState json.RawMessage, accounts []simtypes.Account, chainId string, ...) + type Config struct + AllInvariants bool + BlockSize int + ChainID string + Commit bool + ExportParamsHeight int + ExportParamsPath string + ExportStatePath string + ExportStatsPath string + GenesisFile string + InitialBlockHeight int + Lean bool + NumBlocks int + OnOperation bool + ParamsFile string + Seed int64 + WriteStatsToDB bool + func NewConfigFromFlags() Config + func SetupSimulation(dirPrefix, dbName string) (Config, dbm.DB, string, log.Logger, bool, error) + type DummyLogWriter struct + func (lw *DummyLogWriter) AddEntry(_ OperationEntry) + func (lw *DummyLogWriter) PrintLogs() + type EmptyAppOptions struct + func (ao EmptyAppOptions) Get(o string) interface{} + type EventStats map[string]map[string]map[string]int + func NewEventStats() EventStats + func (es EventStats) ExportJSON(path string) + func (es EventStats) Print(w io.Writer) + func (es EventStats) Tally(route, op, evResult string) + type InitFunctions struct + AppInitialStateFn AppStateFn + RandomAccountFn RandomAccountFn + func DefaultSimInitFunctions(moduleAccountAddresses map[string]bool) InitFunctions + type LogWriter interface + AddEntry func(OperationEntry) + PrintLogs func() + func NewLogWriter(tb testing.TB) LogWriter + type OperationEntry struct + EntryKind string + Height int64 + Operation json.RawMessage + Order int64 + func BeginBlockEntry(height int64) OperationEntry + func EndBlockEntry(height int64) OperationEntry + func MsgEntry(height, order int64, opMsg simulation.OperationMsg) OperationEntry + func NewOperationEntry(entry string, height, order int64, op json.RawMessage) OperationEntry + func QueuedMsgEntry(height int64, opMsg simulation.OperationMsg) OperationEntry + func (oe OperationEntry) MustMarshal() json.RawMessage + type OperationQueue map[int][]simulation.Operation + func NewOperationQueue() OperationQueue + type Params struct + func RandomParams(r *rand.Rand) Params + func (p Params) BlockSizeTransitionMatrix() simulation.TransitionMatrix + func (p Params) EvidenceFraction() float64 + func (p Params) InitialLivenessWeightings() []int + func (p Params) LivenessTransitionMatrix() simulation.TransitionMatrix + func (p Params) NumKeys() int + func (p Params) PastEvidenceFraction() float64 + type RandomAccountFn func(r *rand.Rand, n int) []simtypes.Account + func WrapRandAccFnForResampling(randFn RandomAccountFn, blockList map[string]bool) RandomAccountFn + type StandardLogWriter struct + OpEntries []OperationEntry + func (lw *StandardLogWriter) AddEntry(opEntry OperationEntry) + func (lw *StandardLogWriter) PrintLogs()