tfix too short headers file - electrum - Electrum Bitcoin wallet HTML git clone https://git.parazyd.org/electrum DIR Log DIR Files DIR Refs DIR Submodules --- DIR commit 4bab8b63e192078be98ebbf0e84581b2056b5dc5 DIR parent dc388d4c7c541fadb9869727e359edace4c9f6f0 HTML Author: ThomasV <thomasv@electrum.org> Date: Wed, 20 Dec 2017 12:37:45 +0100 fix too short headers file Diffstat: M lib/network.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) --- DIR diff --git a/lib/network.py b/lib/network.py t@@ -949,8 +949,8 @@ class Network(util.DaemonThread): def init_headers_file(self): b = self.blockchains[0] filename = b.path() - if not os.path.exists(filename): - length = 80 * len(bitcoin.NetworkConstants.CHECKPOINTS) * 2016 + length = 80 * len(bitcoin.NetworkConstants.CHECKPOINTS) * 2016 + if not os.path.exists(filename) or os.path.getsize(filename) < length: with open(filename, 'wb') as f: if length>0: f.seek(length-1)