tnetwork: minor fix - electrum - Electrum Bitcoin wallet HTML git clone https://git.parazyd.org/electrum DIR Log DIR Files DIR Refs DIR Submodules --- DIR commit e6116db565eac1b3870944132c98c7e9b11bf1a2 DIR parent 96a685a765a673402da4aaddb9bfaf9148f52f4f HTML Author: ThomasV <thomasv@electrum.org> Date: Thu, 13 Jul 2017 09:31:27 +0200 network: minor fix Diffstat: M lib/network.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) --- DIR diff --git a/lib/network.py b/lib/network.py t@@ -835,7 +835,6 @@ class Network(util.DaemonThread): if b: interface.mode = 'default' interface.blockchain = b - #interface.print_error('passed checkpoint', b.filename) self.queue_request('blockchain.headers.subscribe', [], interface) else: interface.print_error("checkpoint failed") t@@ -850,12 +849,13 @@ class Network(util.DaemonThread): interface.print_error("binary search") next_height = (interface.bad + interface.good) // 2 else: - interface.bad = height - delta = interface.tip - height - next_height = interface.tip - 2 * delta - if next_height < 0: - interface.print_error("header didn't connect, dismissing interface") + if height == 0: self.connection_down(interface.server) + next_height = None + else: + interface.bad = height + delta = interface.tip - height + next_height = max(0, interface.tip - 2 * delta) elif interface.mode == 'binary': if can_connect: interface.good = height