Improve further labelfix
MODIFY
WalletWasabi/Blockchain/Mempool/MempoolService.cs
WalletWasabi/Blockchain/Mempool/MempoolService.cs
@@ -4,6 +4,7 @@ using System.Diagnostics.CodeAnalysis;
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
+using WalletWasabi.Blockchain.Analysis.Clustering;
using WalletWasabi.Blockchain.Transactions;
using WalletWasabi.Logging;
using WalletWasabi.Models;
@@ -159,14 +160,7 @@ namespace WalletWasabi.Blockchain.Mempool
{
if (ProcessedTransactionHashes.Add(tx.GetHash()))
{
- if (TryGetFromBroadcastStore(tx.GetHash(), out var entry))
- {
- txAdded = entry.Transaction;
- }
- else
- {
- txAdded = new SmartTransaction(tx, Height.Mempool);
- }
+ txAdded = new SmartTransaction(tx, Height.Mempool, label: TryGetLabel(tx.GetHash()));
}
else
{
@@ -180,5 +174,16 @@ namespace WalletWasabi.Blockchain.Mempool
TransactionReceived?.Invoke(this, txAdded);
}
}
+
+ public SmartLabel TryGetLabel(uint256 txid)
+ {
+ var label = SmartLabel.Empty;
+ if (TryGetFromBroadcastStore(txid, out var entry))
+ {
+ label = entry.Transaction.Label;
+ }
+
+ return label;
+ }
}
}

MODIFY
WalletWasabi/Wallets/Wallet.cs
WalletWasabi/Wallets/Wallet.cs
@@ -6,6 +6,7 @@ using System.Linq;
using System.Threading;
using System.Threading.Tasks;
using WalletWasabi.Backend.Models;
+using WalletWasabi.Blockchain.Analysis.Clustering;
using WalletWasabi.Blockchain.Analysis.FeesEstimation;
using WalletWasabi.Blockchain.Keys;
using WalletWasabi.Blockchain.TransactionBuilding;
@@ -436,7 +437,7 @@ namespace WalletWasabi.Wallets
for (int i = 0; i < currentBlock.Transactions.Count; i++)
{
Transaction tx = currentBlock.Transactions[i];
- txsToProcess.Add(new SmartTransaction(tx, height, currentBlock.GetHash(), i, firstSeen: currentBlock.Header.BlockTime));
+ txsToProcess.Add(new SmartTransaction(tx, height, currentBlock.GetHash(), i, firstSeen: currentBlock.Header.BlockTime, label: BitcoinStore.MempoolService.TryGetLabel(tx.GetHash())));
}
TransactionProcessor.Process(txsToProcess);
KeyManager.SetBestHeight(height);

Improve further labelfix