Skip to content

Commit

Permalink
fix: fix cli query merkle proof invalid issue (#336)
Browse files Browse the repository at this point in the history
  • Loading branch information
forcodedancing authored Apr 18, 2023
1 parent 9ecc0a0 commit f9cb8e3
Showing 1 changed file with 5 additions and 5 deletions.
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

0 comments on commit f9cb8e3

Please sign in to comment.