mirror of
https://github.com/fluencelabs/tendermint
synced 2025-04-26 07:12:16 +00:00
36 lines
759 B
Go
36 lines
759 B
Go
|
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
|
||
|
}
|