async def get_header_blocks_in_range(self, start: int, stop: int, tx_filter: bool=True) -> Dict[(bytes32, HeaderBlock)]:
    hashes = []
    for height in range(start, (stop + 1)):
        if self.contains_height(uint32(height)):
            header_hash: bytes32 = self.height_to_hash(uint32(height))
            hashes.append(header_hash)
    blocks: List[FullBlock] = []
    for hash in hashes.copy():
        block = self.block_store.block_cache.get(hash)
        if (block is not None):
            blocks.append(block)
            hashes.remove(hash)
    blocks_on_disk: List[FullBlock] = (await self.block_store.get_blocks_by_hash(hashes))
    blocks.extend(blocks_on_disk)
    header_blocks: Dict[(bytes32, HeaderBlock)] = {}
    for block in blocks:
        if (self.height_to_hash(block.height) != block.header_hash):
            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, [], [])
        else:
            tx_additions: List[CoinRecord] = [c for c in (await self.coin_store.get_coins_added_at_height(block.height)) if (not c.coinbase)]
            removed: List[CoinRecord] = (await self.coin_store.get_coins_removed_at_height(block.height))
            header = get_block_header(block, [record.coin for record in tx_additions], [record.coin.name() for record in removed])
        header_blocks[header.header_hash] = header
    return header_blocks
async def get_header_blocks_in_range(self, start: int, stop: int, tx_filter: bool=True) -> Dict[(bytes32, HeaderBlock)]:
    hashes = []
    for height in range(start, (stop + 1)):
        if self.contains_height(uint32(height)):
            header_hash: bytes32 = self.height_to_hash(uint32(height))
            hashes.append(header_hash)
    blocks: List[FullBlock] = []
    for hash in hashes.copy():
        block = self.block_store.block_cache.get(hash)
        if (block is not None):
            blocks.append(block)
            hashes.remove(hash)
    blocks_on_disk: List[FullBlock] = (await self.block_store.get_blocks_by_hash(hashes))
    blocks.extend(blocks_on_disk)
    header_blocks: Dict[(bytes32, HeaderBlock)] = {}
    for block in blocks:
        if (self.height_to_hash(block.height) != block.header_hash):
            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, [], [])
        else:
            tx_additions: List[CoinRecord] = [c for c in (await self.coin_store.get_coins_added_at_height(block.height)) if (not c.coinbase)]
            removed: List[CoinRecord] = (await self.coin_store.get_coins_removed_at_height(block.height))
            header = get_block_header(block, [record.coin for record in tx_additions], [record.coin.name() for record in removed])
        header_blocks[header.header_hash] = header
    return header_blocks