electrum

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

commit 33b11422a885ebdb9a10b913c043b04c329fbf4d
parent 98a809415deb191bdd1a8f2e3f81822cb7851d6f
Author: ThomasV <thomasv@gitorious>
Date:   Fri,  6 Mar 2015 08:12:30 +0100

give a short timeout for daemon calls that actually do not require the network

Diffstat:
Mlib/network_proxy.py | 6+++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/lib/network_proxy.py b/lib/network_proxy.py @@ -190,7 +190,7 @@ class NetworkProxy(threading.Thread): return self.interfaces def get_header(self, height): - return self.synchronous_get([('network.get_header',[height])])[0] + return self.synchronous_get([('network.get_header', [height])], timeout=0.1)[0] def get_local_height(self): return self.blockchain_height @@ -208,10 +208,10 @@ class NetworkProxy(threading.Thread): return self.unanswered_requests == {} def get_parameters(self): - return self.synchronous_get([('network.get_parameters',[])])[0] + return self.synchronous_get([('network.get_parameters', [])], timeout=0.1)[0] def set_parameters(self, *args): - return self.synchronous_get([('network.set_parameters',args)])[0] + return self.synchronous_get([('network.set_parameters', args)], timeout=0.1)[0] def stop(self): self.running = False