diff --git a/core/error.go b/core/error.go index 4610842cee..7dd5b8a432 100644 --- a/core/error.go +++ b/core/error.go @@ -66,10 +66,6 @@ var ( // have enough funds for transfer(topmost call only). ErrInsufficientFundsForTransfer = errors.New("insufficient funds for transfer") - // ErrMaxInitCodeSizeExceeded is returned if creation transaction provides the init code bigger - // than init code size limit. - ErrMaxInitCodeSizeExceeded = errors.New("max initcode size exceeded") - // ErrInsufficientBalanceWitness is returned if the transaction sender has enough // funds to cover the transfer, but not enough to pay for witness access/modification // costs for the transaction diff --git a/internal/ethapi/errors.go b/internal/ethapi/errors.go index e406c36d6c..cc79af6f3c 100644 --- a/internal/ethapi/errors.go +++ b/internal/ethapi/errors.go @@ -141,7 +141,7 @@ func txValidationError(err error) *invalidTxError { return &invalidTxError{Message: err.Error(), Code: errCodeIntrinsicGas} case errors.Is(err, core.ErrInsufficientFundsForTransfer): return &invalidTxError{Message: err.Error(), Code: errCodeInsufficientFunds} - case errors.Is(err, core.ErrMaxInitCodeSizeExceeded): + case errors.Is(err, vm.ErrMaxInitCodeSizeExceeded): return &invalidTxError{Message: err.Error(), Code: errCodeMaxInitCodeSizeExceeded} } return &invalidTxError{