code: func (pool *TxPool) addTxsLocked(txs []*types.Transaction, local bool) []error {
  	// Add the batch of transactions, tracking the accepted ones
  	dirty := make(map[common.Address]struct{})
  	errs := make([]error, len(txs))
  
  	for i, tx := range txs {
  		var replace bool
  		if replace, errs[i] = pool.add(tx, local); errs[i] == nil && !replace {
  			from, _ := types.Sender(pool.signer, tx) // already validated
  			dirty[from] = struct{}{}
  		}
  	}
  	// Only reprocess the internal state if something was actually added
  	if len(dirty) > 0 {
  		addrs := make([]common.Address, 0, len(dirty))
  		for addr := range dirty {
  			addrs = append(addrs, addr)
  		}
  		pool.promoteExecutables(addrs)
  	}
  	return errs
  }
docs: // addTxsLocked attempts to queue a batch of transactions if they are valid,
  // whilst assuming the transaction pool lock is already held.