commit 882e259a78024d63b576d6ff3a8d50a576327072
parent 4c2deb6d2bfe4680a2cc9596f15d10823665f58a
Author: ThomasV <thomasv@electrum.org>
Date: Tue, 1 Aug 2017 11:00:12 +0200
sanity check read_header
Diffstat:
1 file changed, 2 insertions(+), 0 deletions(-)
diff --git a/lib/blockchain.py b/lib/blockchain.py
@@ -242,6 +242,8 @@ class Blockchain(util.PrintError):
def read_header(self, height):
assert self.parent_id != self.checkpoint
+ if height < 0:
+ return
if height < self.checkpoint:
return self.parent().read_header(height)
if height > self.height():