mirror of
https://github.com/fluencelabs/tendermint
synced 2025-06-20 16:36:31 +00:00
Query: LastHeight -> Height :)
This commit is contained in:
@ -17,13 +17,13 @@ import (
|
||||
|
||||
// Structure for data passed to print response.
|
||||
type response struct {
|
||||
Data []byte
|
||||
Code types.CodeType
|
||||
Key []byte
|
||||
Value []byte
|
||||
Log string
|
||||
LastHeight string
|
||||
Proof []byte
|
||||
Data []byte
|
||||
Code types.CodeType
|
||||
Key []byte
|
||||
Value []byte
|
||||
Log string
|
||||
Height string
|
||||
Proof []byte
|
||||
}
|
||||
|
||||
// client is a global variable so it can be reused by the console
|
||||
@ -299,20 +299,20 @@ func cmdQuery(c *cli.Context) error {
|
||||
return err
|
||||
}
|
||||
resQuery, err := client.QuerySync(types.RequestQuery{
|
||||
Data: queryBytes,
|
||||
Path: "/store", // TOOD expose
|
||||
LastHeight: 0, // TODO expose
|
||||
Data: queryBytes,
|
||||
Path: "/store", // TOOD expose
|
||||
Height: 0, // TODO expose
|
||||
//Prove: true, // TODO expose
|
||||
})
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
printResponse(c, response{
|
||||
Code: resQuery.Code,
|
||||
Key: resQuery.Key,
|
||||
Value: resQuery.Value,
|
||||
Log: resQuery.Log,
|
||||
LastHeight: fmt.Sprintf("%v", resQuery.LastHeight),
|
||||
Code: resQuery.Code,
|
||||
Key: resQuery.Key,
|
||||
Value: resQuery.Value,
|
||||
Log: resQuery.Log,
|
||||
Height: fmt.Sprintf("%v", resQuery.Height),
|
||||
//Proof: resQuery.Proof,
|
||||
})
|
||||
return nil
|
||||
@ -346,8 +346,8 @@ func printResponse(c *cli.Context, rsp response) {
|
||||
if rsp.Log != "" {
|
||||
fmt.Printf("-> log: %s\n", rsp.Log)
|
||||
}
|
||||
if rsp.LastHeight != "" {
|
||||
fmt.Printf("-> height: %s\n", rsp.LastHeight)
|
||||
if rsp.Height != "" {
|
||||
fmt.Printf("-> height: %s\n", rsp.Height)
|
||||
}
|
||||
if rsp.Proof != nil {
|
||||
fmt.Printf("-> proof: %X\n", rsp.Proof)
|
||||
|
Reference in New Issue
Block a user