Browse Source

Merge pull request #87 from tendermint/ResultsLike

Abci result error type comparison
pull/1780/head
Ethan Buchman 8 years ago
committed by GitHub
parent
commit
20159f6081
1 changed files with 4 additions and 0 deletions
  1. +4
    -0
      types/result.go

+ 4
- 0
types/result.go 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)
}


Loading…
Cancel
Save