CheckTx and DeliverTx return ResponseCheckTx and ResponseDeliverTx respectively

Commit now returns ResponseCommit
This commit is contained in:
Anton Kaliaev
2017-11-20 20:26:37 -06:00
parent 92801dbd72
commit 3a3d508e5c
7 changed files with 74 additions and 44 deletions

View File

@ -106,6 +106,10 @@ func (r *ResponseCheckTx) Result() Result {
}
}
func (r ResponseCheckTx) IsErr() bool {
return r.Code != CodeType_OK
}
// Convert ResponseDeliverTx to standard Result
func (r *ResponseDeliverTx) Result() Result {
return Result{
@ -116,6 +120,10 @@ func (r *ResponseDeliverTx) Result() Result {
}
}
func (r ResponseDeliverTx) IsErr() bool {
return r.Code != CodeType_OK
}
type ResultQuery struct {
Code CodeType `json:"code"`
Index int64 `json:"index"`