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.

25 lines
627 B

8 years ago
8 years ago
8 years ago
8 years ago
  1. package core
  2. import (
  3. ctypes "github.com/tendermint/tendermint/rpc/core/types"
  4. )
  5. //-----------------------------------------------------------------------------
  6. func ABCIQuery(query []byte) (*ctypes.ResultABCIQuery, error) {
  7. res := proxyAppQuery.QuerySync(query)
  8. return &ctypes.ResultABCIQuery{res}, nil
  9. }
  10. func ABCIInfo() (*ctypes.ResultABCIInfo, error) {
  11. res, err := proxyAppQuery.InfoSync()
  12. if err != nil {
  13. return nil, err
  14. }
  15. return &ctypes.ResultABCIInfo{
  16. Data: res.Data,
  17. Version: res.Version,
  18. LastBlockHeight: res.LastBlockHeight,
  19. LastBlockAppHash: res.LastBlockAppHash,
  20. }, nil
  21. }