diff --git a/core/tx_pool.go b/core/tx_pool.go index d148559984..8d4bc97279 100644 --- a/core/tx_pool.go +++ b/core/tx_pool.go @@ -271,6 +271,9 @@ func NewTxPool(config TxPoolConfig, chainconfig *params.ChainConfig, chain block reorgDoneCh: make(chan chan struct{}), reorgShutdownCh: make(chan struct{}), gasPrice: new(big.Int).SetUint64(config.PriceLimit), + + // Heuristic limit, reject transactions over 32KB to prevent DOS attacks + maxTxSize: 32 * 1024, } pool.locals = newAccountSet(pool.signer) for _, addr := range config.Locals {