code: func (mp *TxPool) IsTransactionInPool(hash *chainhash.Hash) bool {
  	// Protect concurrent access.
  	mp.mtx.RLock()
  	inPool := mp.isTransactionInPool(hash)
  	mp.mtx.RUnlock()
  
  	return inPool
  }
docs: // IsTransactionInPool returns whether or not the passed transaction already
  // exists in the main pool.
  //
  // This function is safe for concurrent access.