tmsp: ResponseInfo and ResponseEndBlock

This commit is contained in:
Ethan Buchman
2017-01-12 15:21:20 -05:00
parent e7a12f8e38
commit 2dd7030579
8 changed files with 45 additions and 50 deletions
+10 -2
View File
@@ -12,6 +12,14 @@ func TMSPQuery(query []byte) (*ctypes.ResultTMSPQuery, error) {
}
func TMSPInfo() (*ctypes.ResultTMSPInfo, error) {
res, tmspInfo, lastBlockInfo, configInfo := proxyAppQuery.InfoSync()
return &ctypes.ResultTMSPInfo{res, tmspInfo, lastBlockInfo, configInfo}, nil
res, err := proxyAppQuery.InfoSync()
if err != nil {
return nil, err
}
return &ctypes.ResultTMSPInfo{
Data: res.Data,
Version: res.Version,
LastBlockHeight: res.LastBlockHeight,
LastBlockAppHash: res.LastBlockAppHash,
}, nil
}
+4 -4
View File
@@ -74,10 +74,10 @@ type ResultUnconfirmedTxs struct {
}
type ResultTMSPInfo struct {
Result tmsp.Result `json:"result"`
TMSPInfo *tmsp.TMSPInfo `json:"tmsp_info"`
LastBlockInfo *tmsp.LastBlockInfo `json:"last_block_info"`
ConfigInfo *tmsp.ConfigInfo `json:"config_info"`
Data string `json:"data"`
Version string `json:"version"`
LastBlockHeight uint64 `json:"last_block_height"`
LastBlockAppHash []byte `json:"last_block_app_hash"`
}
type ResultTMSPQuery struct {