From 98fba58905b638944911e11f3eaa0da48cf7f16d Mon Sep 17 00:00:00 2001 From: Tanmay Date: Thu, 24 Oct 2024 15:25:54 -0400 Subject: [PATCH] add comments --- app/export.go | 2 +- cmd/zetacored/root.go | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) 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 {