2016-08-22 13:00:48 -07:00
|
|
|
package core
|
|
|
|
|
|
|
|
import (
|
2017-01-28 08:27:13 -08:00
|
|
|
abci "github.com/tendermint/abci/types"
|
2016-08-22 13:00:48 -07:00
|
|
|
ctypes "github.com/tendermint/tendermint/rpc/core/types"
|
|
|
|
)
|
|
|
|
|
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
|
2017-01-28 08:27:13 -08:00
|
|
|
func ABCIQuery(path string, data []byte, prove bool) (*ctypes.ResultABCIQuery, error) {
|
|
|
|
resQuery, err := proxyAppQuery.QuerySync(abci.RequestQuery{
|
|
|
|
Path: path,
|
|
|
|
Data: data,
|
|
|
|
Prove: prove,
|
|
|
|
})
|
|
|
|
if err != nil {
|
|
|
|
return nil, err
|
|
|
|
}
|
|
|
|
return &ctypes.ResultABCIQuery{resQuery}, nil
|
2016-08-22 13:00:48 -07:00
|
|
|
}
|
|
|
|
|
2017-01-12 12:53:32 -08:00
|
|
|
func ABCIInfo() (*ctypes.ResultABCIInfo, error) {
|
2017-01-28 08:27:13 -08:00
|
|
|
resInfo, err := proxyAppQuery.InfoSync()
|
2017-01-12 12:13:47 -08:00
|
|
|
if err != nil {
|
|
|
|
return nil, err
|
|
|
|
}
|
2017-01-28 08:27:13 -08:00
|
|
|
return &ctypes.ResultABCIInfo{resInfo}, nil
|
2016-08-22 13:00:48 -07:00
|
|
|
}
|