Browse Source

don't wait for wallet sync in rpc commands; instead, show wallet status in status command

283
ThomasV 9 years ago
parent
commit
3bed2e3106
  1. 2
      lib/commands.py
  2. 4
      lib/daemon.py

2
lib/commands.py

@ -443,7 +443,7 @@ class Commands:
time_str = datetime.datetime.fromtimestamp(timestamp).isoformat(' ')[:-3] time_str = datetime.datetime.fromtimestamp(timestamp).isoformat(' ')[:-3]
except Exception: except Exception:
time_str = "----" time_str = "----"
label, is_default_label = self.wallet.get_label(tx_hash) label = self.wallet.get_label(tx_hash)
out.append({ out.append({
'txid':tx_hash, 'txid':tx_hash,
'timestamp':timestamp, 'timestamp':timestamp,

4
lib/daemon.py

@ -103,7 +103,7 @@ class Daemon(DaemonThread):
'nodes': self.network.get_interfaces(), 'nodes': self.network.get_interfaces(),
'connected': self.network.is_connected(), 'connected': self.network.is_connected(),
'auto_connect': p[4], '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': elif sub == 'stop':
self.stop() self.stop()
@ -140,8 +140,6 @@ class Daemon(DaemonThread):
cmdname = config.get('cmd') cmdname = config.get('cmd')
cmd = known_commands[cmdname] cmd = known_commands[cmdname]
wallet = self.load_wallet(config) if cmd.requires_wallet else None wallet = self.load_wallet(config) if cmd.requires_wallet else None
if wallet:
wallet.wait_until_synchronized()
# arguments passed to function # arguments passed to function
args = map(lambda x: config.get(x), cmd.params) args = map(lambda x: config.get(x), cmd.params)
# decode json arguments # decode json arguments

Loading…
Cancel
Save