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 cli query merkle proof invalid issue #336

Merged
merged 1 commit into from
Apr 18, 2023
Merged
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
10 changes: 5 additions & 5 deletions client/context/query.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ func (ctx CLIContext) QueryWithData(path string, data []byte) (res []byte, err e
// QueryStore performs a query from a Tendermint node with the provided key and
// store name.
func (ctx CLIContext) QueryStore(key cmn.HexBytes, storeName string) (res []byte, err error) {
return ctx.queryStore(key, storeName, "key")
return ctx.queryStore(key, storeName, "ics23-key")
}

// QuerySubspace performs a query from a Tendermint node with the provided
Expand Down Expand Up @@ -279,11 +279,11 @@ func parseQueryStorePath(path string) (storeName string, err error) {
paths := strings.SplitN(path[1:], "/", 3)
switch {
case len(paths) != 3:
return "", errors.New("expected format like /store/<storeName>/key")
return "", errors.New("expected format like /store/<storeName>/key|ics23-key")
case paths[0] != "store":
return "", errors.New("expected format like /store/<storeName>/key")
case paths[2] != "key":
return "", errors.New("expected format like /store/<storeName>/key")
return "", errors.New("expected format like /store/<storeName>/key|ics23-key")
case paths[2] != "key" && paths[2] != "ics23-key":
return "", errors.New("expected format like /store/<storeName>/key|ics23-key")
}

return paths[1], nil
Expand Down