[WabiSabi Protocol] Implement Moving to TransactionSigning
MODIFY
WalletWasabi/WabiSabi/Backend/Rounds/Arena.cs
WalletWasabi/WabiSabi/Backend/Rounds/Arena.cs
@@ -46,6 +46,8 @@ namespace WalletWasabi.WabiSabi.Backend.Rounds
// Remove timed out alices.
TimeoutAlices();
+ StepOutputRegistrationPhase();
+
StepConnectionConfirmationPhase();
StepInputRegistrationPhase();
@@ -101,6 +103,17 @@ namespace WalletWasabi.WabiSabi.Backend.Rounds
}
}
+ private void StepOutputRegistrationPhase()
+ {
+ foreach (var round in Rounds.Values.Where(x => x.Phase == Phase.OutputRegistration))
+ {
+ if (round.Alices.Sum(x => x.CalculateRemainingAmountCredentials(round.FeeRate)) == round.Bobs.Sum(x => x.CredentialAmount))
+ {
+ round.SetPhase(Phase.TransactionSigning);
+ }
+ }
+ }
+
private async Task CreateRoundsAsync()
{
if (!Rounds.Values.Any(x => !x.IsBlameRound && x.Phase == Phase.InputRegistration))

[WabiSabi Protocol] Implement Moving to TransactionSigning