public static async Task InitializeWalletServiceAsync(KeyManager keyManager) { ChaumianClient = new CcjClient(Network, BlindingPubKey, keyManager, Config.GetCurrentBackendUri()); WalletService = new WalletService(keyManager, IndexDownloader, ChaumianClient, MemPoolService, Nodes, BlocksDir); ChaumianClient.Start(); Logger.LogInfo("Start Chaumian CoinJoin service..."); using (CancelWalletServiceInitialization = new CancellationTokenSource()) { Logger.LogInfo("Starting WalletService..."); await WalletService.InitializeAsync(CancelWalletServiceInitialization.Token); Logger.LogInfo("WalletService started."); } CancelWalletServiceInitialization = null; // Must make it null explicitly, because dispose won't make it null. }
public static async Task InitializeWalletServiceAsync(KeyManager keyManager) { ChaumianClient = new CcjClient(Synchronizer, Network, keyManager, Config.GetCurrentBackendUri(), Config.GetTorSocks5EndPoint()); WalletService = new WalletService(keyManager, Synchronizer, ChaumianClient, MemPoolService, Nodes, DataDir, Config.ServiceConfiguration); ChaumianClient.Start(); Logger.LogInfo("Start Chaumian CoinJoin service..."); using (CancelWalletServiceInitialization = new CancellationTokenSource()) { Logger.LogInfo("Starting WalletService..."); await WalletService.InitializeAsync(CancelWalletServiceInitialization.Token); Logger.LogInfo("WalletService started."); } CancelWalletServiceInitialization = null; // Must make it null explicitly, because dispose won't make it null. WalletService.Coins.CollectionChanged += Coins_CollectionChanged; }