electrum

Electrum Bitcoin wallet
git clone https://git.parazyd.org/electrum
Log | Files | Refs | Submodules

commit 3bed2e3106b171f6807f985945d2cb3e41488991
parent 026f9312a7189cd8ef903ac24b68a60906e51706
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:
Mlib/commands.py | 2+-
Mlib/daemon.py | 4+---
2 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/lib/commands.py b/lib/commands.py @@ -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, diff --git a/lib/daemon.py b/lib/daemon.py @@ -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() @@ -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