Check error

This commit is contained in:
Christopher Goes 2018-11-13 16:17:40 +01:00 committed by Jack Zampolin
parent 17b9afaaa7
commit 42402d3f97
2 changed files with 6 additions and 3 deletions

View File

@ -325,8 +325,8 @@ func (app *GaiaApp) ExportAppStateAndValidators() (appState json.RawMessage, val
} }
// load a particular height // load a particular height
func (app *GaiaApp) LoadHeight(height int64) { func (app *GaiaApp) LoadHeight(height int64) error {
app.LoadVersion(height, app.keyMain) return app.LoadVersion(height, app.keyMain)
} }
//______________________________________________________________________________________________ //______________________________________________________________________________________________

View File

@ -68,7 +68,10 @@ func exportAppStateAndTMValidators(
) (json.RawMessage, []tmtypes.GenesisValidator, error) { ) (json.RawMessage, []tmtypes.GenesisValidator, error) {
gApp := app.NewGaiaApp(logger, db, traceStore) gApp := app.NewGaiaApp(logger, db, traceStore)
if height != -1 { if height != -1 {
gApp.LoadHeight(height) err := gApp.LoadHeight(height)
if err != nil {
return err
}
} }
return gApp.ExportAppStateAndValidators() return gApp.ExportAppStateAndValidators()
} }