Skip to content

Commit

Permalink
get_rate.py by Marco Pui via VSCode Live Share session
Browse files Browse the repository at this point in the history
Co-authored-by: marco925 <[email protected]>
  • Loading branch information
Emojigit and marco5507 committed Dec 25, 2023
1 parent 8c38bae commit c3521f0
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion bchosttrust/cli/get_rate.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,13 @@ def cli(ctx: click.Context, safe: bool, hostname: str):

storage: BCHTStorageBase = ctx.obj["storage"]

# use search.get_specific_website_rating
last_block_hash = None
try:
last_block_hash = get_last_block_hash(storage, safe=safe)
except RuntimeError as e:
echo(f"Error getting last block hash: {e}", err=True)
ctx.exit(1)

rating = search.get_specific_website_rating(
storage, hostname, last_block_hash)
echo(rating)

0 comments on commit c3521f0

Please sign in to comment.