diff --git a/core/tx_pool.go b/core/tx_pool.go index 7a3aa8cd1efe..813c9a1a86f6 100644 --- a/core/tx_pool.go +++ b/core/tx_pool.go @@ -711,7 +711,7 @@ func (pool *TxPool) add(tx *types.Transaction, local bool) (replaced bool, err e return pool.promoteSpecialTx(from, tx, isLocal) } // If the transaction pool is full, discard underpriced transactions - if uint64(pool.all.Count()) >= pool.config.GlobalSlots+pool.config.GlobalQueue { + if uint64(pool.all.Slots()+numSlots(tx)) > pool.config.GlobalSlots+pool.config.GlobalQueue { log.Debug("Add transaction to pool full", "hash", hash, "nonce", tx.Nonce()) // If the new transaction is underpriced, don't accept it if !isLocal && pool.priced.Underpriced(tx) {