Report AllCoinsPrivate
MODIFY
WalletWasabi/WabiSabi/Client/CoinJoinManager.cs
WalletWasabi/WabiSabi/Client/CoinJoinManager.cs
@@ -167,6 +167,18 @@ public class CoinJoinManager : BackgroundService
return;
}
+ if (IsWalletPrivate(walletToStart))
+ {
+ NotifyCoinJoinStartError(walletToStart, CoinjoinError.AllCoinsPrivate);
+
+ // In AutoCoinJoin mode we are keep watching.
+ if (startCommand.RestartAutomatically)
+ {
+ ScheduleRestartAutomatically(walletToStart, startCommand.OverridePlebStop);
+ }
+ return;
+ }
+
var coinCandidates = SelectCandidateCoins(walletToStart, synchronizerResponse.BestHeight).ToArray();
if (coinCandidates.Length == 0)
{
@@ -392,6 +404,18 @@ public class CoinJoinManager : BackgroundService
&& x.Kitchen.HasIngredients)
.ToImmutableDictionary(x => x.WalletName, x => x);
+ private bool IsWalletPrivate(Wallet wallet)
+ {
+ var coins = new CoinsView(wallet.Coins);
+
+ if (GetPrivacyPercentage(coins, wallet.KeyManager.AnonScoreTarget) > 0.99)
+ {
+ return true;
+ }
+
+ return false;
+ }
+
private IEnumerable<SmartCoin> SelectCandidateCoins(Wallet openedWallet, int bestHeight)
{
var coins = new CoinsView(openedWallet.Coins

MODIFY
WalletWasabi/WabiSabi/Client/StatusChangedEvents/StatusChangedEventArgs.cs
WalletWasabi/WabiSabi/Client/StatusChangedEvents/StatusChangedEventArgs.cs
@@ -21,7 +21,8 @@ public enum CoinjoinError
AutoConjoinDisabled,
UserInSendWorkflow,
NotEnoughUnprivateBalance,
- BackendNotSynchronized
+ BackendNotSynchronized,
+ AllCoinsPrivate,
}
public class StatusChangedEventArgs : EventArgs

Report AllCoinsPrivate