Instead of RoundId we are showing the successful Rounds completed.
MODIFY
WalletWasabi.Backend/Controllers/ChaumianCoinJoinController.cs
WalletWasabi.Backend/Controllers/ChaumianCoinJoinController.cs
@@ -37,8 +37,8 @@ namespace WalletWasabi.Backend.Controllers
/// <summary>
/// Satoshi gets various status information.
/// </summary>
- /// <returns>List of CcjRunningRoundStatus (Phase, Denomination, RegisteredPeerCount, RequiredPeerCount, MaximumInputCountPerPeer, FeePerInputs, FeePerOutputs, CoordinatorFeePercent)</returns>
- /// <response code="200">List of CcjRunningRoundStatus (Phase, Denomination, RegisteredPeerCount, RequiredPeerCount, MaximumInputCountPerPeer, FeePerInputs, FeePerOutputs, CoordinatorFeePercent)</response>
+ /// <returns>List of CcjRunningRoundStatus (Phase, Denomination, RegisteredPeerCount, RequiredPeerCount, MaximumInputCountPerPeer, FeePerInputs, FeePerOutputs, CoordinatorFeePercent, RoundId, SuccessfulRoundCount)</returns>
+ /// <response code="200">List of CcjRunningRoundStatus (Phase, Denomination, RegisteredPeerCount, RequiredPeerCount, MaximumInputCountPerPeer, FeePerInputs, FeePerOutputs, CoordinatorFeePercent, RoundId, SuccessfulRoundCount)</response>
[HttpGet("states")]
[ProducesResponseType(200)]
public IActionResult GetStates()
@@ -58,7 +58,8 @@ namespace WalletWasabi.Backend.Controllers
FeePerInputs = round.FeePerInputs,
FeePerOutputs = round.FeePerOutputs,
CoordinatorFeePercent = round.CoordinatorFeePercent,
- RoundId = round.RoundId
+ RoundId = round.RoundId,
+ SuccessfulRoundCount = Coordinator.GetCoinJoinCount() // This is round independent, it is only here because of backward compatibility.
};
response.Add(state);

MODIFY
WalletWasabi.Gui/Controls/WalletExplorer/CoinJoinTabView.xaml
WalletWasabi.Gui/Controls/WalletExplorer/CoinJoinTabView.xaml
</StackPanel>
<StackPanel Orientation="Horizontal" Spacing="4">
- <TextBlock Text="Round ID:"></TextBlock>
- <TextBlock Text="{Binding RoundId}"></TextBlock>
+ <TextBlock Text="Number of Successful Rounds:"></TextBlock>
+ <TextBlock Text="{Binding SuccessfulRoundCount}"></TextBlock>
</StackPanel>
<StackPanel Orientation="Horizontal" Spacing="4" Margin="0 12" >
</StackPanel>
<StackPanel Orientation="Horizontal" Spacing="4">
- <TextBlock Text="Number Of Registered Peers:"></TextBlock>
+ <TextBlock Text="Number of Registered Peers:"></TextBlock>
<TextBlock Foreground="YellowGreen" Text="{Binding PeersRegistered}"></TextBlock>
<TextBlock Text="/"></TextBlock>
<TextBlock Text="{Binding PeersNeeded}"></TextBlock>

MODIFY
WalletWasabi.Gui/Controls/WalletExplorer/CoinJoinTabViewModel.cs
WalletWasabi.Gui/Controls/WalletExplorer/CoinJoinTabViewModel.cs
@@ -23,6 +23,7 @@ namespace WalletWasabi.Gui.Controls.WalletExplorer
private CoinListViewModel _availableCoinsList;
private CoinListViewModel _queuedCoinsList;
private long _roundId;
+ private int _successfulRoundCount;
private CcjRoundPhase _phase;
private Money _requiredBTC;
private string _coordinatorFeePercent;
@@ -82,6 +83,7 @@ namespace WalletWasabi.Gui.Controls.WalletExplorer
if (mostAdvancedRound != default)
{
RoundId = mostAdvancedRound.State.RoundId;
+ SuccessfulRoundCount = mostAdvancedRound.State.SuccessfulRoundCount;
Phase = mostAdvancedRound.State.Phase;
PeersRegistered = mostAdvancedRound.State.RegisteredPeerCount;
PeersNeeded = mostAdvancedRound.State.RequiredPeerCount;
@@ -89,6 +91,7 @@ namespace WalletWasabi.Gui.Controls.WalletExplorer
else
{
RoundId = -1;
+ SuccessfulRoundCount = -1;
Phase = CcjRoundPhase.InputRegistration;
PeersRegistered = 0;
PeersNeeded = 100;
@@ -210,6 +213,7 @@ namespace WalletWasabi.Gui.Controls.WalletExplorer
if (mostAdvancedRound != default)
{
RoundId = mostAdvancedRound.State.RoundId;
+ SuccessfulRoundCount = mostAdvancedRound.State.SuccessfulRoundCount;
Phase = mostAdvancedRound.State.Phase;
PeersRegistered = mostAdvancedRound.State.RegisteredPeerCount;
PeersNeeded = mostAdvancedRound.State.RequiredPeerCount;
@@ -288,6 +292,12 @@ namespace WalletWasabi.Gui.Controls.WalletExplorer
set { this.RaiseAndSetIfChanged(ref _roundId, value); }
}
+ public int SuccessfulRoundCount
+ {
+ get { return _successfulRoundCount; }
+ set { this.RaiseAndSetIfChanged(ref _successfulRoundCount, value); }
+ }
+
public CcjRoundPhase Phase
{
get { return _phase; }

MODIFY
WalletWasabi/Backend/Models/Responses/CcjRunningRoundState.cs
WalletWasabi/Backend/Models/Responses/CcjRunningRoundState.cs
@@ -34,6 +34,11 @@ namespace WalletWasabi.Backend.Models.Responses
public long RoundId { get; set; }
+ /// <summary>
+ /// This is round independent, it is only here because of backward compatibility.
+ /// </summary>
+ public int SuccessfulRoundCount { get; set; }
+
public static CcjRunningRoundState CloneExcept(CcjRunningRoundState state, long roundId, int registeredPeerCount)
{
return new CcjRunningRoundState
@@ -47,7 +52,8 @@ namespace WalletWasabi.Backend.Models.Responses
FeePerOutputs = state.FeePerOutputs,
MaximumInputCountPerPeer = state.MaximumInputCountPerPeer,
RegistrationTimeout = state.RegistrationTimeout,
- RoundId = roundId
+ RoundId = roundId,
+ SuccessfulRoundCount = state.SuccessfulRoundCount
};
}

MODIFY
WalletWasabi/Services/CcjCoordinator.cs
WalletWasabi/Services/CcjCoordinator.cs
@@ -317,6 +317,11 @@ namespace WalletWasabi.Services
}
}
+ public int GetCoinJoinCount()
+ {
+ return CoinJoins.Count;
+ }
+
public async Task<bool> IsUnconfirmedCoinJoinLimitReachedAsync()
{
using (await CoinJoinsLock.LockAsync())

Instead of RoundId we are showing the successful Rounds completed.