mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-03-22 19:08:07 +00:00
internal/ethapi: add errorCode of 3 to revertError
This commit is contained in:
parent
d9b4bc76d4
commit
304a63c298
1 changed files with 3 additions and 2 deletions
|
|
@ -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{} {
|
||||
|
|
|
|||
Loading…
Reference in a new issue