internal/ethapi: add errorCode of 3 to revertError
This commit is contained in:
committed by
Péter Szilágyi
parent
d9b4bc76d4
commit
304a63c298
@ -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{} {
|
||||
|
Reference in New Issue
Block a user