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 home dir issue in export command #337

Merged
merged 1 commit into from
Dec 14, 2020
Merged

Fix home dir issue in export command #337

merged 1 commit into from
Dec 14, 2020

Conversation

alpe
Copy link
Contributor

@alpe alpe commented Dec 11, 2020

Resolves #334

Manually tested with a local instance and wasmd export and ``wasmd --home=/ export`

@alpe alpe requested a review from ethanfrey December 11, 2020 10:27
@codecov
Copy link

codecov bot commented Dec 11, 2020

Codecov Report

Merging #337 (06f42c5) into master (576f620) will decrease coverage by 0.17%.
The diff coverage is n/a.

Impacted file tree graph

@@            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     
Impacted Files Coverage Δ
x/wasm/internal/keeper/keeper.go 89.97% <0.00%> (-0.59%) ⬇️
x/wasm/internal/types/params.go 61.44% <0.00%> (+0.66%) ⬆️

Copy link
Member

@ethanfrey ethanfrey left a 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")
Copy link
Member

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)
Copy link
Member

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.

@alpe alpe merged commit 9e2a97e into master Dec 14, 2020
@alpe alpe deleted the export_home_334 branch January 21, 2021 13:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Invalid homeDir for export command
2 participants