Skip to content

Commit

Permalink
Set consolidation mode if mixing to another wallet
Browse files Browse the repository at this point in the history
  • Loading branch information
molnard committed May 7, 2024
1 parent 375b3e3 commit 743c0e0
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 0 additions & 2 deletions WalletWasabi.Daemon/Rpc/WasabiJsonRpcService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -495,8 +495,6 @@ public void StartCoinjoinSweeping(string? password = null, string? outputWalletN

private async Task StartCoinjoinSweepAsync(Wallet activeWallet, Wallet outputWallet)
{
activeWallet.ConsolidationMode = true;

// If output wallet isn't initialized, then load it.
if (outputWallet.State == WalletState.Uninitialized)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@ public async Task<CoinJoinTracker> CreateAndStartAsync(IWallet wallet, IWallet?
throw new NotSupportedException("Wallet has no key chain.");
}

// The only use-case when we set consolidation mode to true, when we are mixing to another wallet.
wallet.ConsolidationMode = outputWallet is not null && outputWallet.WalletId != wallet.WalletId;

var coinSelector = CoinJoinCoinSelector.FromWallet(wallet);
var coinJoinClient = new CoinJoinClient(
HttpClientFactory,
Expand Down
2 changes: 1 addition & 1 deletion WalletWasabi/Wallets/IWallet.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public interface IWallet
PaymentBatch BatchedPayments => new();

int AnonScoreTarget { get; }
bool ConsolidationMode { get; }
bool ConsolidationMode { get; set; }
TimeSpan FeeRateMedianTimeFrame { get; }
bool RedCoinIsolation { get; }
CoinjoinSkipFactors CoinjoinSkipFactors { get; }
Expand Down

0 comments on commit 743c0e0

Please sign in to comment.