code: func (l *txList) Add(tx *types.Transaction, priceBump uint64) (bool, *types.Transaction) {
  	// If there's an older better transaction, abort
  	old := l.txs.Get(tx.Nonce())
  	if old != nil {
  		threshold := new(big.Int).Div(new(big.Int).Mul(old.GasPrice(), big.NewInt(100+int64(priceBump))), big.NewInt(100))
  		// Have to ensure that the new gas price is higher than the old gas
  		// price as well as checking the percentage threshold to ensure that
  		// this is accurate for low (Wei-level) gas price replacements
  		if old.GasPrice().Cmp(tx.GasPrice()) >= 0 || threshold.Cmp(tx.GasPrice()) > 0 {
  			return false, nil
  		}
  	}
  	// Otherwise overwrite the old transaction with the current one
  	l.txs.Put(tx)
  	if cost := tx.Cost(); l.costcap.Cmp(cost) < 0 {
  		l.costcap = cost
  	}
  	if gas := tx.Gas(); l.gascap < gas {
  		l.gascap = gas
  	}
  	return true, old
  }
docs: // Add tries to insert a new transaction into the list, returning whether the
  // transaction was accepted, and if yes, any previous transaction it replaced.
  //
  // If the new transaction is accepted into the list, the lists' cost and gas
  // thresholds are also potentially updated.