Skip to content

Commit

Permalink
Merge pull request WalletWasabi#12450 from adamPetho/reduce_log_level…
Browse files Browse the repository at this point in the history
…_incase_of_detected_double_spent_CJ

Catch wrong phase exception in CJManager in case of detected double spend
  • Loading branch information
molnard authored Feb 14, 2024
2 parents ab5acb9 + 767fce6 commit a0af31f
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions WalletWasabi/WabiSabi/Client/CoinJoinManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
using WalletWasabi.Extensions;
using WalletWasabi.Helpers;
using WalletWasabi.Logging;
using WalletWasabi.WabiSabi.Backend.Models;
using WalletWasabi.WabiSabi.Client.Banning;
using WalletWasabi.WabiSabi.Client.CoinJoinProgressEvents;
using WalletWasabi.WabiSabi.Client.RoundStateAwaiters;
Expand Down Expand Up @@ -544,6 +545,11 @@ private async Task HandleCoinJoinFinalizationAsync(CoinJoinTracker finishedCoinJ
// The fix is already done but the clients have to upgrade.
wallet.LogInfo($"{nameof(CoinJoinClient)} failed with exception: '{e}'");
}
catch (WabiSabiProtocolException wpe) when (wpe.ErrorCode == WabiSabiProtocolErrorCode.WrongPhase)
{
// This can happen when the coordinator aborts the round in Signing phase because of detected double spend.
wallet.LogInfo($"{nameof(CoinJoinClient)} failed with: '{wpe.Message}'");
}
catch (Exception e)
{
wallet.LogError($"{nameof(CoinJoinClient)} failed with exception: '{e}'");
Expand Down

0 comments on commit a0af31f

Please sign in to comment.