Renamed param and split a foreach
MODIFY
WalletWasabi/Blockchain/Analysis/BlockchainAnalyzer.cs
WalletWasabi/Blockchain/Analysis/BlockchainAnalyzer.cs
@@ -221,10 +221,14 @@ namespace WalletWasabi.Blockchain.Analysis
// or at the very least assume that all the changes in the tx is ours.
// For example even if the assumed change output is a payment to someone, a blockchain analyzer
// probably would just assume it's ours and go on with its life.
- foreach (var key in tx.WalletInputs.Concat(tx.WalletOutputs).Select(x => x.HdPubKey))
+ foreach (var key in tx.WalletInputs.Select(x => x.HdPubKey))
{
key.SetAnonymitySet(1);
}
+ foreach (var key in tx.WalletOutputs.Select(x => x.HdPubKey))
+ {
+ key.SetAnonymitySet(1, tx.GetHash());
+ }
}
private void AnalyzeClusters(SmartTransaction tx)

MODIFY
WalletWasabi/Blockchain/Keys/HdPubKey.cs
WalletWasabi/Blockchain/Keys/HdPubKey.cs
@@ -97,11 +97,11 @@ namespace WalletWasabi.Blockchain.Keys
private int HashCode { get; }
- public void SetAnonymitySet(int anonset, uint256? reason = null)
+ public void SetAnonymitySet(int anonset, uint256? outputAnonSetReason = null)
{
- if (reason is not null)
+ if (outputAnonSetReason is not null)
{
- OutputAnonSetReasons.Add(reason);
+ OutputAnonSetReasons.Add(outputAnonSetReason);
}
AnonymitySet = anonset;

Renamed param and split a foreach