|
@ -1,10 +1,12 @@ |
|
|
package core |
|
|
package core |
|
|
|
|
|
|
|
|
import ( |
|
|
import ( |
|
|
|
|
|
"fmt" |
|
|
|
|
|
|
|
|
abci "github.com/tendermint/tendermint/abci/types" |
|
|
abci "github.com/tendermint/tendermint/abci/types" |
|
|
|
|
|
cmn "github.com/tendermint/tendermint/libs/common" |
|
|
ctypes "github.com/tendermint/tendermint/rpc/core/types" |
|
|
ctypes "github.com/tendermint/tendermint/rpc/core/types" |
|
|
"github.com/tendermint/tendermint/version" |
|
|
"github.com/tendermint/tendermint/version" |
|
|
cmn "github.com/tendermint/tendermint/libs/common" |
|
|
|
|
|
) |
|
|
) |
|
|
|
|
|
|
|
|
// Query the application for some information.
|
|
|
// Query the application for some information.
|
|
@ -48,6 +50,10 @@ import ( |
|
|
// | height | int64 | 0 | false | Height (0 means latest) |
|
|
|
// | height | int64 | 0 | false | Height (0 means latest) |
|
|
|
// | trusted | bool | false | false | Does not include a proof of the data inclusion |
|
|
|
// | trusted | bool | false | false | Does not include a proof of the data inclusion |
|
|
|
func ABCIQuery(path string, data cmn.HexBytes, height int64, trusted bool) (*ctypes.ResultABCIQuery, error) { |
|
|
func ABCIQuery(path string, data cmn.HexBytes, height int64, trusted bool) (*ctypes.ResultABCIQuery, error) { |
|
|
|
|
|
if height < 0 { |
|
|
|
|
|
return nil, fmt.Errorf("height must be non-negative") |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
resQuery, err := proxyAppQuery.QuerySync(abci.RequestQuery{ |
|
|
resQuery, err := proxyAppQuery.QuerySync(abci.RequestQuery{ |
|
|
Path: path, |
|
|
Path: path, |
|
|
Data: data, |
|
|
Data: data, |
|
|