code: func (idx *AddrIndex) UnconfirmedTxnsForAddress(addr btcutil.Address) []*btcutil.Tx {
  	// Ignore unsupported address types.
  	addrKey, err := addrToKey(addr)
  	if err != nil {
  		return nil
  	}
  
  	// Protect concurrent access.
  	idx.unconfirmedLock.RLock()
  	defer idx.unconfirmedLock.RUnlock()
  
  	// Return a new slice with the results if there are any.  This ensures
  	// safe concurrency.
  	if txns, exists := idx.txnsByAddr[addrKey]; exists {
  		addressTxns := make([]*btcutil.Tx, 0, len(txns))
  		for _, tx := range txns {
  			addressTxns = append(addressTxns, tx)
  		}
  		return addressTxns
  	}
  
  	return nil
  }
docs: // UnconfirmedTxnsForAddress returns all transactions currently in the
  // unconfirmed (memory-only) address index that involve the passed address.
  // Unsupported address types are ignored and will result in no results.
  //
  // This function is safe for concurrent access.