Merge PR #3304: Non-zero-height export fix
* Tiny non-zero-height export fix * Fix linter
This commit is contained in:
parent
133934ae37
commit
eff1f7ca10
|
@ -65,12 +65,14 @@ func newApp(logger log.Logger, db dbm.DB, traceStore io.Writer) abci.Application
|
|||
func exportAppStateAndTMValidators(
|
||||
logger log.Logger, db dbm.DB, traceStore io.Writer, height int64, forZeroHeight bool,
|
||||
) (json.RawMessage, []tmtypes.GenesisValidator, error) {
|
||||
gApp := app.NewGaiaApp(logger, db, traceStore, false)
|
||||
if height != -1 {
|
||||
gApp := app.NewGaiaApp(logger, db, traceStore, false)
|
||||
err := gApp.LoadHeight(height)
|
||||
if err != nil {
|
||||
return nil, nil, err
|
||||
}
|
||||
return gApp.ExportAppStateAndValidators(forZeroHeight)
|
||||
}
|
||||
gApp := app.NewGaiaApp(logger, db, traceStore, true)
|
||||
return gApp.ExportAppStateAndValidators(forZeroHeight)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue