From c07395d2b8bf04b04f87e5f3ef027328d3205c04 Mon Sep 17 00:00:00 2001 From: Gandalf <gandalf@storm.pl> Date: Sat, 6 May 2023 20:27:01 +0000 Subject: [PATCH] Get rid of annoying error message if jrpc_block_num is None --- jussi/cache/utils.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/jussi/cache/utils.py b/jussi/cache/utils.py index 0158646..5c44a16 100644 --- a/jussi/cache/utils.py +++ b/jussi/cache/utils.py @@ -31,6 +31,8 @@ def irreversible_ttl(jsonrpc_response: dict=None, return TTL.NO_CACHE try: jrpc_block_num = block_num_from_jsonrpc_response(jsonrpc_response) + if jrpc_block_num is None: + return TTL.NO_CACHE if jrpc_block_num > last_irreversible_block_num: return TTL.EXTENDED_TTL else: -- GitLab