use RemoveAlicesBy, bc it acquires the round lock
MODIFY
WalletWasabi/CoinJoin/Coordinator/Rounds/CoordinatorRound.cs
WalletWasabi/CoinJoin/Coordinator/Rounds/CoordinatorRound.cs
@@ -661,12 +661,12 @@ public class CoordinatorRound
}
var alicesToRemove = Alices.Where(alice => inputsToBan.Any(outpoint => alice.Inputs.Select(input => input.Outpoint).Contains(outpoint)));
- Logger.LogInfo($"Alices({alicesToRemove.Count()}) was force banned in round '{RoundId}'.");
- foreach (var alice in alicesToRemove)
- {
- Alices.Remove(alice);
- }
+
+ RemoveAlicesBy(alicesToRemove.Select(alice => alice.UniqueId).ToArray());
+
await UtxoReferee.BanUtxosAsync(1, DateTimeOffset.UtcNow, forceNoted: false, RoundId, forceBan: true, inputsToBan.ToArray()).ConfigureAwait(false);
+
+ Logger.LogInfo($"Alices({alicesToRemove.Count()}) was force banned in round '{RoundId}'.");
}
private async Task MoveToInputRegistrationAsync()

use RemoveAlicesBy, bc it acquires the round lock