diff --git a/chia/consensus/blockchain.py b/chia/consensus/blockchain.py index 14dbb222b99a..36de2af2eda3 100644 --- a/chia/consensus/blockchain.py +++ b/chia/consensus/blockchain.py @@ -843,6 +843,10 @@ async def get_header_blocks_in_range( raise ValueError(f"Block at {block.header_hash} is no longer in the blockchain (it's in a fork)") if tx_filter is False: header = get_block_header(block, [], []) + elif block.transactions_generator is None: + # There is no point in getting additions and removals for + # blocks that do not have transactions. + header = get_block_header(block, [], []) else: tx_additions: list[CoinRecord] = [ c for c in (await self.coin_store.get_coins_added_at_height(block.height)) if not c.coinbase