Skip to content

Commit

Permalink
Merge PR #3304: Non-zero-height export fix
Browse files Browse the repository at this point in the history
* Tiny non-zero-height export fix
* Fix linter
  • Loading branch information
cwgoes authored Jan 16, 2019
1 parent 133934a commit eff1f7c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion cmd/gaia/cmd/gaiad/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}

0 comments on commit eff1f7c

Please sign in to comment.