ton_header: return early if block_height is missing - electrum - Electrum Bitcoin wallet HTML git clone https://git.parazyd.org/electrum DIR Log DIR Files DIR Refs DIR Submodules --- DIR commit 173c034e2619dda72fe4f6bf5e69e839b9632de0 DIR parent 6631ab9406efabc3dd203ac587672181abec0fc0 HTML Author: ThomasV <thomasv@gitorious> Date: Thu, 12 Jun 2014 15:49:53 +0200 on_header: return early if block_height is missing Diffstat: M lib/network.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) --- DIR diff --git a/lib/network.py b/lib/network.py t@@ -371,8 +371,11 @@ class Network(threading.Thread): def on_header(self, i, r): result = r.get('result') - if not result: return + if not result: + return height = result.get('block_height') + if not height: + return self.heights[i.server] = height self.merkle_roots[i.server] = result.get('merkle_root') self.utxo_roots[i.server] = result.get('utxo_root')