Improve cancellation of initialization
MODIFY
WalletWasabi.Gui/Global.cs
WalletWasabi.Gui/Global.cs
@@ -134,6 +134,8 @@ namespace WalletWasabi.Gui
{
await SingleInstanceChecker.CheckAsync().ConfigureAwait(false);
+ cancel.ThrowIfCancellationRequested();
+
Cache = new MemoryCache(new MemoryCacheOptions
{
SizeLimit = 1_000,
@@ -142,6 +144,8 @@ namespace WalletWasabi.Gui
var bstoreInitTask = BitcoinStore.InitializeAsync();
var addressManagerFolderPath = Path.Combine(DataDir, "AddressManager");
+ cancel.ThrowIfCancellationRequested();
+
AddressManagerFilePath = Path.Combine(addressManagerFolderPath, $"AddressManager{Network}.dat");
var addrManTask = InitializeAddressManagerBehaviorAsync();
@@ -341,6 +345,8 @@ namespace WalletWasabi.Gui
#endregion JsonRpcServerInitialization
+ cancel.ThrowIfCancellationRequested();
+
#region Blocks provider
var blockProvider = new CachedBlockProvider(
@@ -351,6 +357,8 @@ namespace WalletWasabi.Gui
#endregion Blocks provider
+ cancel.ThrowIfCancellationRequested();
+
WalletManager.RegisterServices(BitcoinStore, Synchronizer, Nodes, Config.ServiceConfiguration, FeeProviders, blockProvider);
}
finally

Improve cancellation of initialization