lock properly
MODIFY
WalletWasabi/Blockchain/Analysis/Clustering/Cluster.cs
WalletWasabi/Blockchain/Analysis/Clustering/Cluster.cs
@@ -52,12 +52,20 @@ namespace WalletWasabi.Blockchain.Analysis.Clustering
}
if (insertPosition > 0) // at least one element was inserted
{
- UpdateLabels();
+ UpdateLabelsNoLock();
}
}
}
public void UpdateLabels()
+ {
+ lock (Lock)
+ {
+ UpdateLabelsNoLock();
+ }
+ }
+
+ private void UpdateLabelsNoLock()
{
Labels = SmartLabel.Merge(Keys.Select(x => x.Label));
}

lock properly