mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-18 02:40:45 +00:00
This commit is contained in:
parent
7fce11d1f1
commit
466e3684b9
2 changed files with 1 additions and 2 deletions
|
|
@ -85,7 +85,6 @@ const (
|
||||||
errCodeClientLimitExceeded = -38026
|
errCodeClientLimitExceeded = -38026
|
||||||
errCodeInternalError = -32603
|
errCodeInternalError = -32603
|
||||||
errCodeInvalidParams = -32602
|
errCodeInvalidParams = -32602
|
||||||
errCodeReverted = -32000
|
|
||||||
errCodeVMError = -32015
|
errCodeVMError = -32015
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -223,7 +223,7 @@ func (sim *simulator) processBlock(ctx context.Context, block *simBlock, header,
|
||||||
if errors.Is(result.Err, vm.ErrExecutionReverted) {
|
if errors.Is(result.Err, vm.ErrExecutionReverted) {
|
||||||
// If the result contains a revert reason, try to unpack it.
|
// If the result contains a revert reason, try to unpack it.
|
||||||
revertErr := newRevertError(result.Revert())
|
revertErr := newRevertError(result.Revert())
|
||||||
callRes.Error = &callError{Message: revertErr.Error(), Code: errCodeReverted, Data: revertErr.ErrorData().(string)}
|
callRes.Error = &callError{Message: revertErr.Error(), Code: revertErr.ErrorCode(), Data: revertErr.ErrorData().(string)}
|
||||||
} else {
|
} else {
|
||||||
callRes.Error = &callError{Message: result.Err.Error(), Code: errCodeVMError}
|
callRes.Error = &callError{Message: result.Err.Error(), Code: errCodeVMError}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue