diff --git a/core/txpool/legacypool/legacypool.go b/core/txpool/legacypool/legacypool.go index 2ad902e34c..0dbf98be24 100644 --- a/core/txpool/legacypool/legacypool.go +++ b/core/txpool/legacypool/legacypool.go @@ -953,16 +953,14 @@ func (pool *LegacyPool) Add(txs []*types.Transaction, sync bool) []error { // The transaction pool lock must be held. // Returns the error for each tx, and the set of accounts that might become promotable. func (pool *LegacyPool) addTxsLocked(txs []*types.Transaction, errs []error) (int64, *accountSet) { - // Short circuit if no transactions. - if len(txs) == 0 { - return 0, nil - } - var ( dirty = newAccountSet(pool.signer) valid int64 ) for i, tx := range txs { + if tx == nil { + continue + } if replaced, err := pool.add(tx); err == nil { if !replaced { dirty.addTx(tx)