-
Notifications
You must be signed in to change notification settings - Fork 411
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 home dir issue in export command #337
Conversation
Codecov Report
@@ Coverage Diff @@
## master #337 +/- ##
==========================================
- Coverage 69.86% 69.68% -0.18%
==========================================
Files 28 28
Lines 2389 2421 +32
==========================================
+ Hits 1669 1687 +18
- Misses 605 616 +11
- Partials 115 118 +3
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ack
logger log.Logger, db dbm.DB, traceStore io.Writer, height int64, forZeroHeight bool, jailAllowedAddrs []string, | ||
appOpts servertypes.AppOptions) (servertypes.ExportedApp, error) { | ||
|
||
var wasmApp *app.WasmApp | ||
homePath, ok := appOpts.Get(flags.FlagHome).(string) | ||
if !ok || homePath == "" { | ||
return servertypes.ExportedApp{}, errors.New("application home not set") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice one
if height != -1 { | ||
wasmApp = app.NewWasmApp(logger, db, traceStore, false, map[int64]bool{}, "", uint(1), app.GetEnabledProposals(), appOpts) | ||
wasmApp = app.NewWasmApp(logger, db, traceStore, false, map[int64]bool{}, homePath, uint(1), app.GetEnabledProposals(), appOpts) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
wow, we literally just passed ""
in there. surprised other code worked.
Resolves #334
Manually tested with a local instance and
wasmd export
and ``wasmd --home=/ export`