diff --git a/app/export.go b/app/export.go index 1f1ae26a96..40a3717adf 100644 --- a/app/export.go +++ b/app/export.go @@ -17,7 +17,7 @@ import ( func (app *App) ExportAppStateAndValidators( forZeroHeight bool, jailAllowedAddrs []string, modulesToExport []string, ) (servertypes.ExportedApp, error) { - // as if they could withdraw from the start of the next block + ctx := app.NewContext(true, tmproto.Header{Height: app.LastBlockHeight()}) // We export at last height + 1, because that's the height at which diff --git a/cmd/zetacored/root.go b/cmd/zetacored/root.go index 1102001703..a78c7aee9e 100644 --- a/cmd/zetacored/root.go +++ b/cmd/zetacored/root.go @@ -298,6 +298,8 @@ func (ac appCreator) appExport( appOpts, ) + // If height is -1, it means we are using the latest height. + // For all other cases, we load the specified height from the Store if height != -1 { err := zetaApp.LoadHeight(height) if err != nil {