code: func (mp *TxPool) isTransactionInPool(hash *chainhash.Hash) bool {
  	if _, exists := mp.pool[*hash]; exists {
  		return true
  	}
  
  	return false
  }
docs: // isTransactionInPool returns whether or not the passed transaction already
  // exists in the main pool.
  //
  // This function MUST be called with the mempool lock held (for reads).