Skip to content

Commit

Permalink
chore: patch non existing accounts
Browse files Browse the repository at this point in the history
  • Loading branch information
aorumbayev committed Dec 15, 2024
1 parent 1128623 commit 67ac5d5
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions src/analytics.py
Original file line number Diff line number Diff line change
Expand Up @@ -168,10 +168,15 @@ def to_pretty_date(date_string: str) -> str:
if cur_address not in all_blocks:
all_blocks[cur_address] = 0

account_info = indexer_client.account_info(cur_address)
all_proposer_balances.append(
account_info["account"]["amount-without-pending-rewards"]
)
try:
account_info = indexer_client.account_info(cur_address)
all_proposer_balances.append(
account_info["account"]["amount-without-pending-rewards"]
)
except Exception as e:
print(f"Error fetching account info for {cur_address}: {e}")
continue

all_blocks[cur_address] += block["count"]

total_blocks = sum(all_blocks.values())
Expand Down

0 comments on commit 67ac5d5

Please # to comment.