Remove cross reference of GetDelaysForRequests
MODIFY
WalletWasabi/WabiSabi/Client/CoinJoinClient.cs
WalletWasabi/WabiSabi/Client/CoinJoinClient.cs
@@ -202,7 +202,8 @@ public class CoinJoinClient
var outputRegistrationEndTime = DateTimeOffset.UtcNow + (remainingTime * 0.8);
Logger.LogDebug($"Round ({roundState.Id}): Output registration started - it will end in: {outputRegistrationEndTime - DateTimeOffset.UtcNow:hh\\:mm\\:ss}");
- await scheduler.StartOutputRegistrationsAsync(outputTxOuts, bobClient, KeyChain, outputRegistrationEndTime, cancellationToken).ConfigureAwait(false);
+ var outputRegistrationScheduledDates = GetDelaysForRequests(outputTxOuts.Count(), outputRegistrationEndTime);
+ await scheduler.StartOutputRegistrationsAsync(outputTxOuts, bobClient, KeyChain, outputRegistrationScheduledDates, cancellationToken).ConfigureAwait(false);
Logger.LogDebug($"Round ({roundState.Id}): Outputs({outputTxOuts.Count()}) successfully registered.");
// ReadyToSign.
@@ -361,7 +362,7 @@ public class CoinJoinClient
await Task.WhenAll(tasks).ConfigureAwait(false);
}
- public static ImmutableList<DateTimeOffset> GetDelaysForRequests(int howMany, DateTimeOffset endTime)
+ private ImmutableList<DateTimeOffset> GetDelaysForRequests(int howMany, DateTimeOffset endTime)
{
var remainingTime = endTime - DateTimeOffset.UtcNow;

MODIFY
WalletWasabi/WabiSabi/Client/DependencyGraphTaskScheduler.cs
WalletWasabi/WabiSabi/Client/DependencyGraphTaskScheduler.cs
@@ -142,7 +142,7 @@ public class DependencyGraphTaskScheduler
}
}
- public async Task StartOutputRegistrationsAsync(IEnumerable<TxOut> txOuts, BobClient bobClient, IKeyChain keyChain, DateTimeOffset outputRegistrationEndTime, CancellationToken cancellationToken)
+ public async Task StartOutputRegistrationsAsync(IEnumerable<TxOut> txOuts, BobClient bobClient, IKeyChain keyChain, ImmutableList<DateTimeOffset> outputRegistrationScheduledDates, CancellationToken cancellationToken)
{
using CancellationTokenSource ctsOnError = new();
using CancellationTokenSource linkedCts = CancellationTokenSource.CreateLinkedTokenSource(cancellationToken, ctsOnError.Token);
@@ -160,9 +160,7 @@ public class DependencyGraphTaskScheduler
return smartRequestNode;
});
- var scheduledDates = CoinJoinClient.GetDelaysForRequests(txOuts.Count(), outputRegistrationEndTime);
-
- var tasks = txOuts.Zip(nodes, scheduledDates,
+ var tasks = txOuts.Zip(nodes, outputRegistrationScheduledDates,
async (txOut, smartRequestNode, scheduledDate) =>
{
try

Remove cross reference of GetDelaysForRequests