Merge pull request #87 from tendermint/ResultsLike

Abci result error type comparison
This commit is contained in:
Ethan Buchman
2017-05-15 15:51:29 +02:00
committed by GitHub
+4
View File
@@ -29,6 +29,10 @@ func (res Result) IsErr() bool {
return res.Code != CodeType_OK
}
func (res Result) IsSameCode(compare Result) bool {
return res.Code == compare.Code
}
func (res Result) Error() string {
return fmt.Sprintf("ABCI{code:%v, data:%X, log:%v}", res.Code, res.Data, res.Log)
}