def clean_block_record(self, height: int):
    '\n        Clears all block records in the cache which have block_record < height.\n        Args:\n            height: Minimum height that we need to keep in the cache\n        '
    if (height < 0):
        return None
    blocks_to_remove = self.__heights_in_cache.get(uint32(height), None)
    while ((blocks_to_remove is not None) and (height >= 0)):
        for header_hash in blocks_to_remove:
            del self.__block_records[header_hash]
        del self.__heights_in_cache[uint32(height)]
        if (height == 0):
            break
        height = (height - 1)
        blocks_to_remove = self.__heights_in_cache.get(uint32(height), None)
Clears all block records in the cache which have block_record < height.
Args:
    height: Minimum height that we need to keep in the cache
def clean_block_record(self, height: int):
    '\n        Clears all block records in the cache which have block_record < height.\n        Args:\n            height: Minimum height that we need to keep in the cache\n        '
    if (height < 0):
        return None
    blocks_to_remove = self.__heights_in_cache.get(uint32(height), None)
    while ((blocks_to_remove is not None) and (height >= 0)):
        for header_hash in blocks_to_remove:
            del self.__block_records[header_hash]
        del self.__heights_in_cache[uint32(height)]
        if (height == 0):
            break
        height = (height - 1)
        blocks_to_remove = self.__heights_in_cache.get(uint32(height), None)