You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

28 lines
670 B

8 years ago
  1. package core
  2. import (
  3. abci "github.com/tendermint/abci/types"
  4. ctypes "github.com/tendermint/tendermint/rpc/core/types"
  5. )
  6. //-----------------------------------------------------------------------------
  7. func ABCIQuery(path string, data []byte, prove bool) (*ctypes.ResultABCIQuery, error) {
  8. resQuery, err := proxyAppQuery.QuerySync(abci.RequestQuery{
  9. Path: path,
  10. Data: data,
  11. Prove: prove,
  12. })
  13. if err != nil {
  14. return nil, err
  15. }
  16. return &ctypes.ResultABCIQuery{resQuery}, nil
  17. }
  18. func ABCIInfo() (*ctypes.ResultABCIInfo, error) {
  19. resInfo, err := proxyAppQuery.InfoSync()
  20. if err != nil {
  21. return nil, err
  22. }
  23. return &ctypes.ResultABCIInfo{resInfo}, nil
  24. }