tfix: server lag - electrum - Electrum Bitcoin wallet HTML git clone https://git.parazyd.org/electrum DIR Log DIR Files DIR Refs DIR Submodules --- DIR commit 9c1b688e4f1630892706941e90c33bc6376c88fb DIR parent a7eb1aadff9782a746b1c0554f39208dfeae0045 HTML Author: ThomasV <thomasv@gitorious> Date: Sat, 5 Oct 2013 11:02:17 +0200 fix: server lag Diffstat: M lib/network.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) --- DIR diff --git a/lib/network.py b/lib/network.py t@@ -199,7 +199,9 @@ class Network(threading.Thread): def switch_to_interface(self, interface): print_error("switching to", interface.server) self.interface = interface - self.server_lag = self.blockchain.height - self.heights[self.interface.server] + h = self.heights.get(self.interface.server) + if h: + self.server_lag = self.blockchain.height - h self.config.set_key('server', self.interface.server, False) self.send_subscriptions() self.trigger_callback('connected')