electrum

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

commit a7679debd1bc75639d5b53b6fbbe8feb583d681d
parent eff0ae1f782dac8a4e902eebfd75a765a71066d1
Author: ThomasV <thomasv@electrum.org>
Date:   Fri, 30 Jun 2017 13:00:06 +0200

fix #2533

Diffstat:
Mlib/network.py | 11+++++++----
1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/lib/network.py b/lib/network.py @@ -777,14 +777,17 @@ class Network(util.DaemonThread): def on_get_chunk(self, interface, response): '''Handle receiving a chunk of block headers''' - if response.get('error'): - interface.print_error(response.get('error')) + error = response.get('error') + result = response.get('result') + params = response.get('params') + if result is None or params is None or error is not None: + interface.print_error(error or 'bad response') return # Ignore unsolicited chunks - index = response['params'][0] + index = params[0] if interface.request != index: return - connect = interface.blockchain.connect_chunk(index, response['result']) + connect = interface.blockchain.connect_chunk(index, result) # If not finished, get the next chunk if not connect: return