Remove unnecessary `RemoveDuplicatedAlices`
MODIFY
WalletWasabi/WabiSabi/Backend/PostRequests/InputRegistrationHandler.cs
WalletWasabi/WabiSabi/Backend/PostRequests/InputRegistrationHandler.cs
@@ -105,8 +105,6 @@ namespace WalletWasabi.WabiSabi.Backend.PostRequests
var commitAmountCredentialResponse = round.AmountCredentialIssuer.PrepareResponse(zeroAmountCredentialRequests);
var commitVsizeCredentialResponse = round.VsizeCredentialIssuer.PrepareResponse(zeroVsizeCredentialRequests);
- RemoveDuplicateAlices(rounds, alice);
-
alice.SetDeadlineRelativeTo(round.ConnectionConfirmationTimeout);
round.Alices.Add(alice);
@@ -114,25 +112,5 @@ namespace WalletWasabi.WabiSabi.Backend.PostRequests
commitAmountCredentialResponse.Commit(),
commitVsizeCredentialResponse.Commit());
}
-
- private static void RemoveDuplicateAlices(IDictionary<uint256, Round> roundsWithId, Alice alice)
- {
- var rounds = roundsWithId.Values;
- if (rounds.Any(x => x.Phase != Phase.InputRegistration))
- {
- throw new WabiSabiProtocolException(WabiSabiProtocolErrorCode.AliceAlreadyRegistered);
- }
-
- var aliceOutPoint = alice.Coin.Outpoint;
- var flattenTable = rounds.SelectMany(x => x.Alices.Select(y => (Round: x, Alice: y, Outpoint: y.Coin.Outpoint)));
-
- foreach (var (round, aliceInRound, _) in flattenTable.Where(x => x.Outpoint == aliceOutPoint).ToArray())
- {
- if (round.Alices.Remove(aliceInRound))
- {
- Logger.LogInfo("Updated Alice registration.");
- }
- }
- }
}
}

Remove unnecessary `RemoveDuplicatedAlices`