code: func (idx *AddrIndex) RemoveUnconfirmedTx(hash *chainhash.Hash) {
  	idx.unconfirmedLock.Lock()
  	defer idx.unconfirmedLock.Unlock()
  
  	// Remove all address references to the transaction from the address
  	// index and remove the entry for the address altogether if it no longer
  	// references any transactions.
  	for addrKey := range idx.addrsByTx[*hash] {
  		delete(idx.txnsByAddr[addrKey], *hash)
  		if len(idx.txnsByAddr[addrKey]) == 0 {
  			delete(idx.txnsByAddr, addrKey)
  		}
  	}
  
  	// Remove the entry from the transaction to address lookup map as well.
  	delete(idx.addrsByTx, *hash)
  }
docs: // RemoveUnconfirmedTx removes the passed transaction from the unconfirmed
  // (memory-only) address index.
  //
  // This function is safe for concurrent access.