Browse Source

result.go is json.go and codetype.go

pull/1780/head
Ethan Buchman 7 years ago
parent
commit
07a9ddb2d5
2 changed files with 35 additions and 34 deletions
  1. +35
    -0
      types/codetype.go
  2. +0
    -34
      types/json.go

+ 35
- 0
types/codetype.go View File

@ -0,0 +1,35 @@
package types
const (
CodeTypeOK uint32 = 0
)
// IsOK returns true if Code is OK.
func (r ResponseCheckTx) IsOK() bool {
return r.Code == CodeTypeOK
}
// IsErr returns true if Code is something other than OK.
func (r ResponseCheckTx) IsErr() bool {
return r.Code != CodeTypeOK
}
// IsOK returns true if Code is OK.
func (r ResponseDeliverTx) IsOK() bool {
return r.Code == CodeTypeOK
}
// IsErr returns true if Code is something other than OK.
func (r ResponseDeliverTx) IsErr() bool {
return r.Code != CodeTypeOK
}
// IsOK returns true if Code is OK.
func (r ResponseQuery) IsOK() bool {
return r.Code == CodeTypeOK
}
// IsErr returns true if Code is something other than OK.
func (r ResponseQuery) IsErr() bool {
return r.Code != CodeTypeOK
}

types/result.go → types/json.go View File


Loading…
Cancel
Save