internal/ethapi: add errorCode of 3 to revertError

This commit is contained in:
Marius van der Wijden
2020-05-28 12:41:56 +02:00
committed by Péter Szilágyi
parent d9b4bc76d4
commit 304a63c298

View File

@ -868,7 +868,6 @@ var _ rpc.DataError = (*revertError)(nil)
type revertError struct {
err string // The error string
code int // optional error code
errData interface{} // additional data
}
@ -877,7 +876,9 @@ func (e revertError) Error() string {
}
func (e revertError) ErrorCode() int {
return e.code
// revert errors are execution errors.
// See: https://github.com/ethereum/wiki/wiki/JSON-RPC-Error-Codes-Improvement-Proposal
return 3
}
func (e revertError) ErrorData() interface{} {