1
0

async block headers

This commit is contained in:
Janus
2018-08-14 17:50:20 +02:00
committed by SomberNight
parent 19387ff911
commit e9ceeb85af
6 changed files with 364 additions and 37 deletions

View File

@@ -308,7 +308,7 @@ class Blockchain(util.PrintError):
elif height == 0:
return constants.net.GENESIS
elif height < len(self.checkpoints) * 2016:
assert (height+1) % 2016 == 0, height
assert (height+1) % 2016 == 0, (height, len(self.checkpoints), (height+1) % 2016)
index = height // 2016
h, t = self.checkpoints[index]
return h