Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ActionsFromWeightedOperations ¶
func ActionsFromWeightedOperations(ops legacysimexec.WeightedOperations) []simtypes.Action
func GetSelectActionFn ¶
func GetSelectActionFn(actions []simtypes.ActionsWithMetadata) selectActionFn
Types ¶
type Manager ¶
type Manager struct { Modules map[string]simtypes.AppModuleSimulation // map of all non-legacy app modules; // contains filtered or unexported fields }
Manager defines a simulation manager that provides the high level utility for managing and executing simulation functionalities for a group of modules
func CreateSimulationManager ¶
createSimulationManager returns a simulation manager must be ran after modulemanager.SetInitGenesisOrder
func (Manager) Actions ¶
TODO: Can we use sim here instead? Perhaps by passing in the simulation module manager to the simulator.
func (Manager) GenerateGenesisStates ¶
func (m Manager) GenerateGenesisStates(simState *module.SimulationState, sim *simtypes.SimCtx)
TODO: Fix this Unfortunately I'm temporarily giving up on fixing genesis logic, its very screwed up in the legacy designs and I want to move on to the more interesting goals of this simulation refactor. We do need to come back and un-screw up alot of this genesis work.
Thankfully for Osmosis-custom modules, we don't really care about genesis logic. (yet) The architectural errors for future readers revolve around on the design of the * Design of the AppStateFn (just look at it, osmosis/simapp/state.go)
- Abstraction leaks overt amounts of code riddle it!
* Configs being read key by key per module via AppParams, should be a typed config * Operation/Action weights being read from params, rather than from come generic config loading * every module not just returning a genesis struct, and instead mutating things in place The only error corrected in the genesis work over what was present in prior code is: better rand handling (simCtx), and calling genesis in the InitGenesis ordering.