Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: fix default node home when exporting the state #843

Merged
merged 2 commits into from
Apr 27, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
type: fix
module: other
pull_request: 843
description: Fixed the default home path inside the export command
backward_compatible: true
date: 2022-04-26T10:38:44.43005827Z
16 changes: 14 additions & 2 deletions app/desmos/cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -298,13 +298,25 @@ func createDesmosappAndExport(
encCfg.Marshaler = codec.NewProtoCodec(encCfg.InterfaceRegistry)
var desmosApp *app.DesmosApp
if height != -1 {
desmosApp = app.NewDesmosApp(logger, db, traceStore, false, map[int64]bool{}, "", uint(1), encCfg, appOpts)
desmosApp = app.NewDesmosApp(
logger, db, traceStore, false, map[int64]bool{},
cast.ToString(appOpts.Get(flags.FlagHome)),
uint(1),
encCfg,
appOpts,
)
err := desmosApp.LoadHeight(height)
if err != nil {
return servertypes.ExportedApp{}, err
}
} else {
desmosApp = app.NewDesmosApp(logger, db, traceStore, true, map[int64]bool{}, "", uint(1), encCfg, appOpts)
desmosApp = app.NewDesmosApp(
logger, db, traceStore, true, map[int64]bool{},
cast.ToString(appOpts.Get(flags.FlagHome)),
uint(1),
encCfg,
appOpts,
)
}

return desmosApp.ExportAppStateAndValidators(forZeroHeight, jailAllowedAddrs)
Expand Down