Skip to content

Commit

Permalink
Filter the votes based on contract package hash
Browse files Browse the repository at this point in the history
  • Loading branch information
mrkara committed Jan 14, 2025
1 parent 235ba30 commit 1fb5f0e
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion fetch_validators.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,11 @@ def check_voting_participation(public_key, auth_key, contract_package_hash, star
}

try:
url = f"{base_url}?from_block_height={start_block}&to_block_height={end_block}"
# Add the contract_package_hash to the query
url = (
f"{base_url}?from_block_height={start_block}"
f"&to_block_height={end_block}&contract_package_hash={contract_package_hash}"
)

# Make the GET request
response = requests.get(url, headers=headers)
Expand All @@ -100,6 +104,7 @@ def check_voting_participation(public_key, auth_key, contract_package_hash, star

return 0 # Did not participate


def filter_out_validators(validators):
print("Filtering out ineligible validators...")
eligible_validators = [
Expand Down

0 comments on commit 1fb5f0e

Please sign in to comment.