Skip to content

Commit

Permalink
fixed linting issues
Browse files Browse the repository at this point in the history
  • Loading branch information
danbryan committed Sep 2, 2023
1 parent 43eea54 commit e25719a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ def get_latest_block_height_rpc(rpc_url):
return int(data.get('result', {}).get('sync_info', {}).get('latest_block_height', 0))
except requests.RequestException as e:
return -1 # Return -1 to indicate an error

def get_block_time_rpc(rpc_url, height):
"""Fetch the block header time for a given block height from the RPC endpoint."""
try:
Expand All @@ -153,7 +153,7 @@ def get_block_time_rpc(rpc_url, height):
return data.get('result', {}).get('block', {}).get('header', {}).get('time', "")
except requests.RequestException as e:
return None

def parse_isoformat_string(date_string):
date_string = re.sub(r"(\.\d{6})\d+Z", r"\1Z", date_string)
date_string = date_string.replace("Z", "+00:00")
Expand Down

0 comments on commit e25719a

Please sign in to comment.