internal/ethapi: add errorCode to revert error

This commit is contained in:
Marius van der Wijden
2020-05-28 11:27:20 +02:00
committed by Péter Szilágyi
parent cc37ce796b
commit d9b4bc76d4
2 changed files with 10 additions and 3 deletions

View File

@ -868,6 +868,7 @@ var _ rpc.DataError = (*revertError)(nil)
type revertError struct {
err string // The error string
code int // optional error code
errData interface{} // additional data
}
@ -875,6 +876,10 @@ func (e revertError) Error() string {
return e.err
}
func (e revertError) ErrorCode() int {
return e.code
}
func (e revertError) ErrorData() interface{} {
return e.errData
}