mirror of
https://github.com/tendermint/tendermint.git
synced 2026-09-26 01:44:16 +00:00
remove Result from the client package
plus make Client interface more consistent. All *Sync functions now return an error as a second return param. Deliver/Check/Commit use Code to indicate errors and have IsErr() func defined on ResponseXYZ structs.
This commit is contained in:
@@ -106,6 +106,7 @@ func (r *ResponseCheckTx) Result() Result {
|
||||
}
|
||||
}
|
||||
|
||||
// IsErr returns true if Code is something other than OK.
|
||||
func (r ResponseCheckTx) IsErr() bool {
|
||||
return r.Code != CodeType_OK
|
||||
}
|
||||
@@ -120,6 +121,7 @@ func (r *ResponseDeliverTx) Result() Result {
|
||||
}
|
||||
}
|
||||
|
||||
// IsErr returns true if Code is something other than OK.
|
||||
func (r ResponseDeliverTx) IsErr() bool {
|
||||
return r.Code != CodeType_OK
|
||||
}
|
||||
@@ -145,3 +147,8 @@ func (r *ResponseQuery) Result() *ResultQuery {
|
||||
Log: r.Log,
|
||||
}
|
||||
}
|
||||
|
||||
// IsErr returns true if Code is something other than OK.
|
||||
func (r ResponseCommit) IsErr() bool {
|
||||
return r.Code != CodeType_OK
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user