block cache fix

This commit is contained in:
Tim
2024-05-01 14:24:07 -04:00
parent 3d4ea57d97
commit 98dcc23c7f

View File

@@ -43,7 +43,7 @@ async def _cache_fetch(key: tuple[int, Union[int,bytes]], default: Union[Block,
result = await fetch_block_by_number(blockid, chain_id=chain_id)
else:
result = await fetch_block(blockid, chain_id=chain_id)
if result is not None:
if result is None:
# log.debug(f'Could not lookup block {blockid}')
return None # do not cache
_lru[key] = result