From d4d31578940d99ad844a273aba467f1fc8cf7c6a Mon Sep 17 00:00:00 2001 From: Adam Gibson Date: Sat, 15 Jan 2022 15:34:56 +0000 Subject: [PATCH] Unlock does not block waiting for sync Fixes #1123. Prior to this commit, the unlockwallet method erroneously waited for wallet sync before continuing and returning the credential. This was not necessary as the WalletService method startService calls wallet syncing asynchronously(!) in request_wallet_sync. Hence this initial syncing step is removed, allowing the RPC call to return immediately. --- jmclient/jmclient/wallet_rpc.py | 5 ----- 1 file changed, 5 deletions(-) diff --git a/jmclient/jmclient/wallet_rpc.py b/jmclient/jmclient/wallet_rpc.py index 5d82f4d..d682cfa 100644 --- a/jmclient/jmclient/wallet_rpc.py +++ b/jmclient/jmclient/wallet_rpc.py @@ -367,11 +367,6 @@ class JMWalletDaemon(Service): jlog.warn("Ignoring rescan request from backend wallet service: " + msg) self.wallet_service.add_restart_callback(dummy_restart_callback) self.wallet_name = wallet_name - # the daemon blocks here until the wallet synchronization - # from the blockchain interface completes; currently this is - # fine as long as the client handles the response asynchronously: - while not self.wallet_service.synced: - self.wallet_service.sync_wallet(fast=True) self.wallet_service.register_callbacks( [self.wss_factory.sendTxNotification], None) self.wallet_service.startService()