Skip to content
Snippets Groups Projects
Commit c07395d2 authored by Gandalf's avatar Gandalf
Browse files

Get rid of annoying error message if jrpc_block_num is None

parent 3bb69719
No related branches found
No related tags found
1 merge request!11Minor maintenance changes
......@@ -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:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment