(logger log.Logger, db dbm.DB, traceStore io.Writer, height int64, forZeroHeight bool, jailAllowedAddrs []string, appOpts servertypes.AppOptions)
| 188 | } |
| 189 | |
| 190 | func createSimappAndExport(logger log.Logger, db dbm.DB, traceStore io.Writer, height int64, forZeroHeight bool, |
| 191 | jailAllowedAddrs []string, appOpts servertypes.AppOptions) (servertypes.ExportedApp, error) { |
| 192 | encCfg := app.MakeTestEncodingConfig() // Ideally, we would reuse the one created by NewRootCmd. |
| 193 | encCfg.Marshaler = codec.NewProtoCodec(encCfg.InterfaceRegistry) |
| 194 | var sifApp *app.SifchainApp |
| 195 | if height != -1 { |
| 196 | sifApp = app.NewSifApp(logger, db, traceStore, false, map[int64]bool{}, "", cast.ToUint(appOpts.Get(server.FlagInvCheckPeriod)), encCfg, appOpts) |
| 197 | if err := sifApp.LoadHeight(height); err != nil { |
| 198 | return servertypes.ExportedApp{}, err |
| 199 | } |
| 200 | } else { |
| 201 | sifApp = app.NewSifApp(logger, db, traceStore, true, map[int64]bool{}, "", cast.ToUint(appOpts.Get(server.FlagInvCheckPeriod)), encCfg, appOpts) |
| 202 | } |
| 203 | return sifApp.ExportAppStateAndValidators(forZeroHeight, jailAllowedAddrs) |
| 204 | } |
nothing calls this directly
no test coverage detected