code: func (pool *TxPool) promoteTx(addr common.Address, hash common.Hash, tx *types.Transaction) bool {
  	// Try to insert the transaction into the pending queue
  	if pool.pending[addr] == nil {
  		pool.pending[addr] = newTxList(true)
  	}
  	list := pool.pending[addr]
  
  	inserted, old := list.Add(tx, pool.config.PriceBump)
  	if !inserted {
  		// An older transaction was better, discard this
  		pool.all.Remove(hash)
  		pool.priced.Removed()
  
  		pendingDiscardCounter.Inc(1)
  		return false
  	}
  	// Otherwise discard any previous transaction and mark this
  	if old != nil {
  		pool.all.Remove(old.Hash())
  		pool.priced.Removed()
  
  		pendingReplaceCounter.Inc(1)
  	}
  	// Failsafe to work around direct pending inserts (tests)
  	if pool.all.Get(hash) == nil {
  		pool.all.Add(tx)
  		pool.priced.Put(tx)
  	}
  	// Set the potentially new pending nonce and notify any subsystems of the new tx
  	pool.beats[addr] = time.Now()
  	pool.pendingState.SetNonce(addr, tx.Nonce()+1)
  
  	return true
  }
docs: // promoteTx adds a transaction to the pending (processable) list of transactions
  // and returns whether it was inserted or an older was better.
  //
  // Note, this method assumes the pool lock is held!