Implement compactness on the client side.
MODIFY
WalletWasabi/Services/MemPoolService.cs
WalletWasabi/Services/MemPoolService.cs
@@ -44,9 +44,10 @@ namespace WalletWasabi.Services
Logger.LogInfo<MemPoolService>("Start cleaning out mempool...");
using (var client = new WasabiClient(destAction, torSocks))
{
- var allMempoolHashes = await client.GetMempoolHashesAsync();
+ var compactness = 10;
+ var allMempoolHashes = await client.GetMempoolHashesAsync(compactness);
- uint256[] toRemove = TransactionHashes.Except(allMempoolHashes).ToArray();
+ var toRemove = TransactionHashes.Where(x => !allMempoolHashes.Any(y => y != x.ToString().Substring(0, compactness)));
foreach (uint256 tx in toRemove)
{
TransactionHashes.TryRemove(tx);

MODIFY
WalletWasabi/Services/WalletService.cs
WalletWasabi/Services/WalletService.cs
@@ -281,12 +281,14 @@ namespace WalletWasabi.Services
{
using (var client = new WasabiClient(Synchronizer.WasabiClient.TorClient.DestinationUriAction, Synchronizer.WasabiClient.TorClient.TorSocks5EndPoint))
{
- var mempoolHashes = await client.GetMempoolHashesAsync();
+ var compactness = 10;
+ var mempoolHashes = await client.GetMempoolHashesAsync(compactness);
+
var mempoolSet = mempoolHashes.ToHashSet();
foreach (var tx in transactions)
{
- if (mempoolSet.Contains(tx.GetHash()))
+ if (mempoolSet.Any(x => x == tx.GetHash().ToString().Substring(0, compactness)))
{
tx.SetHeight(Height.MemPool);
ProcessTransaction(tx);

Implement compactness on the client side.