From 4dac7289848a3eff471336efb6a7f8e5b5a5ed1c Mon Sep 17 00:00:00 2001 From: Neil Booth Date: Sun, 13 Nov 2016 20:10:30 +0900 Subject: [PATCH] Ignore the unspendable genesis coinbase Fixes #17 --- server/block_processor.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/server/block_processor.py b/server/block_processor.py index 28d067c..ad12bb5 100644 --- a/server/block_processor.py +++ b/server/block_processor.py @@ -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: