code: func (mp *TxPool) removeOrphanDoubleSpends(tx *btcutil.Tx) {
  	msgTx := tx.MsgTx()
  	for _, txIn := range msgTx.TxIn {
  		for _, orphan := range mp.orphansByPrev[txIn.PreviousOutPoint] {
  			mp.removeOrphan(orphan, true)
  		}
  	}
  }
docs: // removeOrphanDoubleSpends removes all orphans which spend outputs spent by the
  // passed transaction from the orphan pool.  Removing those orphans then leads
  // to removing all orphans which rely on them, recursively.  This is necessary
  // when a transaction is added to the main pool because it may spend outputs
  // that orphans also spend.
  //
  // This function MUST be called with the mempool lock held (for writes).