Skip to content

Commit

Permalink
Lint changes
Browse files Browse the repository at this point in the history
  • Loading branch information
rodgerjohnson committed Aug 30, 2024
1 parent 97cbfbb commit 3040ae7
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/collectors.py
Original file line number Diff line number Diff line change
Expand Up @@ -427,13 +427,12 @@ def alive(self):
self.client_version_payload) is not None

def block_height(self):
"""Runs a cached query and returns blockheight after converting hex string value to an int"""
"""Cached query and returns blockheight after converting hex string value to an int"""
result = self.interface.cached_json_rpc_post(self.block_height_payload)

if result and isinstance(result, str) and result.startswith('0x'):
return int(result, 16)
else:
raise ValueError(f"Invalid block height result: {result}")
raise ValueError(f"Invalid block height result: {result}")

def client_version(self):
"""Runs a cached query to return client version."""
Expand Down

0 comments on commit 3040ae7

Please sign in to comment.