electrum

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

commit 00aaa1d06595d80c628023f5222186f59c28f529
parent ecdb90b0b7640eff019a5f42ceb088e9b72626ca
Author: ThomasV <thomasv@gitorious>
Date:   Mon,  4 Aug 2014 11:38:34 +0200

send network status on init, if there is no daemon

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

diff --git a/lib/network_proxy.py b/lib/network_proxy.py @@ -32,12 +32,6 @@ from simple_config import SimpleConfig from daemon import NetworkServer, DAEMON_PORT -# policies -SPAWN_DAEMON=0 -NEED_DAEMON=1 -NO_DAEMON=2 -USE_DAEMON_IF_AVAILABLE=3 - class NetworkProxy(threading.Thread): @@ -64,6 +58,9 @@ class NetworkProxy(threading.Thread): self.network = Network(config) self.pipe = util.QueuePipe(send_queue=self.network.requests_queue) self.network.start(self.pipe.get_queue) + for key in ['status','banner','updated','servers','interfaces']: + value = self.network.get_status_value(key) + self.pipe.get_queue.put({'method':'network.status', 'params':[key, value]}) # status variables self.status = 'connecting'