rename systemAwakeChecker to sleep inhibitor
MODIFY
WalletWasabi.Gui/Global.cs
WalletWasabi.Gui/Global.cs
@@ -154,8 +154,6 @@ namespace WalletWasabi.Gui
await LegalChecker.InitializeAsync(HostedServices.Get<UpdateChecker>()).ConfigureAwait(false);
cancel.ThrowIfCancellationRequested();
-
-
await StartTorProcessManagerAsync(cancel).ConfigureAwait(false);
try
@@ -179,11 +177,11 @@ namespace WalletWasabi.Gui
RegisterFeeRateProviders();
RegisterCoinJoinComponents();
- SystemAwakeChecker? systemAwakeChecker = await SystemAwakeChecker.CreateAsync(HostedServices.Get<CoinJoinManager>()).ConfigureAwait(false);
+ SleepInhibitor? sleepInhibitor = await SleepInhibitor.CreateAsync(HostedServices.Get<CoinJoinManager>()).ConfigureAwait(false);
- if (systemAwakeChecker is not null)
+ if (sleepInhibitor is not null)
{
- HostedServices.Register<SystemAwakeChecker>(systemAwakeChecker, "System Awake Checker");
+ HostedServices.Register<SleepInhibitor>(sleepInhibitor, "Sleep Inhibitor");
}
else
{

RENAME
WalletWasabi/Services/SystemAwakeChecker.cs
WalletWasabi/Services/SleepInhibitor.cs
@@ -7,19 +7,18 @@ using WalletWasabi.Helpers;
using WalletWasabi.Helpers.PowerSaving;
using WalletWasabi.Logging;
using WalletWasabi.WabiSabi.Client;
-using WalletWasabi.Wallets;
using static WalletWasabi.Helpers.PowerSaving.LinuxInhibitorTask;
namespace WalletWasabi.Services
{
- public class SystemAwakeChecker : PeriodicRunner
+ public class SleepInhibitor : PeriodicRunner
{
private const string Reason = "CoinJoin is in progress.";
private static readonly TimeSpan Timeout = TimeSpan.FromMinutes(1);
private volatile IPowerSavingInhibitorTask? _powerSavingTask;
- private SystemAwakeChecker(CoinJoinManager coinJoinManager, Func<Task<IPowerSavingInhibitorTask>>? taskFactory) : base(TimeSpan.FromSeconds(5))
+ private SleepInhibitor(CoinJoinManager coinJoinManager, Func<Task<IPowerSavingInhibitorTask>>? taskFactory) : base(TimeSpan.FromSeconds(5))
{
CoinJoinManager = coinJoinManager;
TaskFactory = taskFactory;
@@ -29,7 +28,7 @@ namespace WalletWasabi.Services
public Func<Task<IPowerSavingInhibitorTask>>? TaskFactory { get; }
/// <summary>Checks whether we support awake state prolonging for the current platform.</summary>
- public static async Task<SystemAwakeChecker?> CreateAsync(CoinJoinManager coinJoinManager)
+ public static async Task<SleepInhibitor?> CreateAsync(CoinJoinManager coinJoinManager)
{
Func<Task<IPowerSavingInhibitorTask>>? taskFactory = null;
@@ -61,7 +60,7 @@ namespace WalletWasabi.Services
taskFactory = () => Task.FromResult<IPowerSavingInhibitorTask>(WindowsPowerAvailabilityTask.Create(Reason));
}
- return new SystemAwakeChecker(coinJoinManager, taskFactory);
+ return new SleepInhibitor(coinJoinManager, taskFactory);
}
protected override async Task ActionAsync(CancellationToken cancel)

rename systemAwakeChecker to sleep inhibitor