electrum

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

commit 4bab8b63e192078be98ebbf0e84581b2056b5dc5
parent dc388d4c7c541fadb9869727e359edace4c9f6f0
Author: ThomasV <thomasv@electrum.org>
Date:   Wed, 20 Dec 2017 12:37:45 +0100

fix too short headers file

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

diff --git a/lib/network.py b/lib/network.py @@ -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)