tdon't wait for wallet sync in rpc commands; instead, show wallet status in status command - electrum - Electrum Bitcoin wallet HTML git clone https://git.parazyd.org/electrum DIR Log DIR Files DIR Refs DIR Submodules --- DIR commit 3bed2e3106b171f6807f985945d2cb3e41488991 DIR parent 026f9312a7189cd8ef903ac24b68a60906e51706 HTML Author: ThomasV <thomasv@electrum.org> Date: Thu, 17 Dec 2015 17:54:49 +0100 don't wait for wallet sync in rpc commands; instead, show wallet status in status command Diffstat: M lib/commands.py | 2 +- M lib/daemon.py | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) --- DIR diff --git a/lib/commands.py b/lib/commands.py t@@ -443,7 +443,7 @@ class Commands: time_str = datetime.datetime.fromtimestamp(timestamp).isoformat(' ')[:-3] except Exception: time_str = "----" - label, is_default_label = self.wallet.get_label(tx_hash) + label = self.wallet.get_label(tx_hash) out.append({ 'txid':tx_hash, 'timestamp':timestamp, DIR diff --git a/lib/daemon.py b/lib/daemon.py t@@ -103,7 +103,7 @@ class Daemon(DaemonThread): 'nodes': self.network.get_interfaces(), 'connected': self.network.is_connected(), 'auto_connect': p[4], - 'wallets': self.wallets.keys(), + 'wallets': dict([ (k, w.is_up_to_date()) for k, w in self.wallets.items()]), } elif sub == 'stop': self.stop() t@@ -140,8 +140,6 @@ class Daemon(DaemonThread): cmdname = config.get('cmd') cmd = known_commands[cmdname] wallet = self.load_wallet(config) if cmd.requires_wallet else None - if wallet: - wallet.wait_until_synchronized() # arguments passed to function args = map(lambda x: config.get(x), cmd.params) # decode json arguments