SimulationOperations retrieves the simulation params from the provided file path and returns all the modules weighted operations
(app *akash.AkashApp, cdc codec.JSONCodec, config simtypes.Config)
| 51 | // SimulationOperations retrieves the simulation params from the provided file path |
| 52 | // and returns all the modules weighted operations |
| 53 | func SimulationOperations(app *akash.AkashApp, cdc codec.JSONCodec, config simtypes.Config) []simtypes.WeightedOperation { |
| 54 | simState := module.SimulationState{ |
| 55 | AppParams: make(simtypes.AppParams), |
| 56 | Cdc: cdc, |
| 57 | } |
| 58 | |
| 59 | if config.ParamsFile != "" { |
| 60 | bz, err := os.ReadFile(config.ParamsFile) |
| 61 | if err != nil { |
| 62 | panic(err) |
| 63 | } |
| 64 | |
| 65 | err = json.Unmarshal(bz, &simState.AppParams) |
| 66 | if err != nil { |
| 67 | panic(err) |
| 68 | } |
| 69 | } |
| 70 | |
| 71 | simState.LegacyProposalContents = app.SimulationManager().GetProposalContents(simState) //nolint:staticcheck |
| 72 | simState.ProposalMsgs = app.SimulationManager().GetProposalMsgs(simState) |
| 73 | return app.SimulationManager().WeightedOperations(simState) |
| 74 | } |
| 75 | |
| 76 | // CheckExportSimulation exports the app state and simulation parameters to JSON |
| 77 | // if the export paths are defined. |
nothing calls this directly
no test coverage detected