Adjust down the new base denomination by 1sat in case collision
MODIFY
WalletWasabi/CoinJoin/Coordinator/Rounds/CoordinatorRound.cs
WalletWasabi/CoinJoin/Coordinator/Rounds/CoordinatorRound.cs
@@ -594,7 +594,15 @@ namespace WalletWasabi.CoinJoin.Coordinator.Rounds
private Money CalculateNewDenomination()
{
- return Alices.Min(x => x.InputSum - x.NetworkFeeToPayAfterBaseDenomination);
+ var newDenomination = Alices.Min(x => x.InputSum - x.NetworkFeeToPayAfterBaseDenomination);
+ var collision = MixingLevels.GetLevelsExceptBase().FirstOrDefault(x => x.Denomination == newDenomination);
+ if (collision is { })
+ {
+ newDenomination -= Money.Satoshis(1);
+ Logger.LogDebug($"This is impossibru. The new base denomination is exactly the same as the one of the mixing level. Adjusted the new denomination one satoshi less.");
+ }
+
+ return newDenomination;
}
public async Task ProgressToOutputRegistrationOrFailAsync(params Alice[] alicesNotConfirmConnection)

Adjust down the new base denomination by 1sat in case collision