use schnorrcount as maximumMixingLevelCount
MODIFY
WalletWasabi/Services/CcjClient.cs
WalletWasabi/Services/CcjClient.cs
@@ -449,23 +449,24 @@ namespace WalletWasabi.Services
internalNotCachedLockedKeys = KeyManager.GetKeys(KeyState.Locked, isInternal: true).Except(AccessCache.Keys);
+ var maximumMixingLevelCount = inputRegistrableRound.State.SchnorrPubKeys.Count();
if (allActiveKeys.Count() >= 7 || !internalNotCachedLockedKeys.Any()) // Then don't generate new keys, because it'd bloat the wallet.
{
// Find the first one that we did not try to register in the current session.
foreach (var ac in allActiveKeys.Where(x => !AccessCache.ContainsKey(x)))
{
- if (activeKeys.Count >= Constants.MaximumMixingLevelCount)
+ if (activeKeys.Count >= maximumMixingLevelCount)
{
break;
}
activeKeys.Add(ac);
}
// If there is no such a key, then use the oldest, but make sure it's not the same as the change.
- if (activeKeys.Count < Constants.MaximumMixingLevelCount)
+ if (activeKeys.Count < maximumMixingLevelCount)
{
foreach (var ac in AccessCache.Where(x => allActiveKeys.Contains(x.Key) && changeAddress != x.Key.GetP2wpkhAddress(Network)).OrderBy(x => x.Value).Select(x => x.Key))
{
- if (activeKeys.Count >= Constants.MaximumMixingLevelCount)
+ if (activeKeys.Count >= maximumMixingLevelCount)
{
break;
}
@@ -477,7 +478,7 @@ namespace WalletWasabi.Services
{
foreach (var ac in internalNotCachedLockedKeys.Where(x => changeAddress != x.GetP2wpkhAddress(Network)))
{
- if (activeKeys.Count >= Constants.MaximumMixingLevelCount)
+ if (activeKeys.Count >= maximumMixingLevelCount)
{
break;
}

use schnorrcount as maximumMixingLevelCount