From 98dcc23c7fd80b167d013fbb3eb3e59e3bbe1a95 Mon Sep 17 00:00:00 2001 From: Tim Date: Wed, 1 May 2024 14:24:07 -0400 Subject: [PATCH] block cache fix --- src/dexorder/blocks.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/dexorder/blocks.py b/src/dexorder/blocks.py index e1d4d20..f8377da 100644 --- a/src/dexorder/blocks.py +++ b/src/dexorder/blocks.py @@ -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