Skip to content

Commit 49987a1

Browse files
committed
core/txpool: fix reference ErrMaxInitCodeSizeExceeded
1 parent 6fa32ca commit 49987a1

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

core/txpool/validation.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ import (
2525
"github.com/ethereum/go-ethereum/core"
2626
"github.com/ethereum/go-ethereum/core/state"
2727
"github.com/ethereum/go-ethereum/core/types"
28+
"github.com/ethereum/go-ethereum/core/vm"
2829
"github.com/ethereum/go-ethereum/crypto/kzg4844"
2930
"github.com/ethereum/go-ethereum/log"
3031
"github.com/ethereum/go-ethereum/params"
@@ -87,7 +88,7 @@ func ValidateTransaction(tx *types.Transaction, head *types.Header, signer types
8788
}
8889
// Check whether the init code size has been exceeded
8990
if rules.IsShanghai && tx.To() == nil && len(tx.Data()) > params.MaxInitCodeSize {
90-
return fmt.Errorf("%w: code size %v, limit %v", core.ErrMaxInitCodeSizeExceeded, len(tx.Data()), params.MaxInitCodeSize)
91+
return fmt.Errorf("%w: code size %v, limit %v", vm.ErrMaxInitCodeSizeExceeded, len(tx.Data()), params.MaxInitCodeSize)
9192
}
9293
if rules.IsOsaka && tx.Gas() > params.MaxTxGas {
9394
return fmt.Errorf("%w (cap: %d, tx: %d)", core.ErrGasLimitTooHigh, params.MaxTxGas, tx.Gas())

0 commit comments

Comments
 (0)