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.

29 lines
741 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. log.Info("ABCIQuery", "path", path, "data", data, "result", resQuery)
  17. return &ctypes.ResultABCIQuery{resQuery}, nil
  18. }
  19. func ABCIInfo() (*ctypes.ResultABCIInfo, error) {
  20. resInfo, err := proxyAppQuery.InfoSync()
  21. if err != nil {
  22. return nil, err
  23. }
  24. return &ctypes.ResultABCIInfo{resInfo}, nil
  25. }