Ignore the unspendable genesis coinbase

Fixes #17
This commit is contained in:
Neil Booth 2016-11-13 20:10:30 +09:00
parent 57dd4ece9c
commit 4dac728984

View File

@ -396,6 +396,11 @@ class BlockProcessor(server.db.DB):
prefetcher only provides a non-None mempool when caught up.
'''
blocks, mempool_hashes = await self.prefetcher.get_blocks()
'''Strip the unspendable genesis coinbase.'''
if self.height == -1:
blocks[0] = blocks[0][:self.coin.HEADER_LEN] + bytes(1)
caught_up = mempool_hashes is not None
try:
for block in blocks: