Skip to content

Commit

Permalink
Fix spid key in availability indexing (#4559)
Browse files Browse the repository at this point in the history
* Fix spid key in availability indexing

* lint
  • Loading branch information
isaacsolo authored Jan 4, 2023
1 parent b8db225 commit f60bffb
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions discovery-provider/src/utils/eth_contracts_helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,14 +61,13 @@ def fetch_all_registered_content_nodes(
for i in ids_list
}
for future in concurrent.futures.as_completed(fetch_cnode_futures):
single_cnode_fetch_op = fetch_cnode_futures[future]
cn_spID = fetch_cnode_futures[future]
try:
cn_endpoint_info = future.result()
# Validate the endpoint on chain
# As endpoints get deregistered, this peering system must not slow down with failed connections
# or unanticipated load
eth_sp_endpoint = cn_endpoint_info[1]
cn_spID = cn_endpoint_info[2]

valid_endpoint = is_fqdn(eth_sp_endpoint)
# Only valid FQDN strings are worth validating
Expand All @@ -79,6 +78,6 @@ def fetch_all_registered_content_nodes(
eth_cn_endpoints_set.add(eth_sp_endpoint)
except Exception as exc:
logger.error(
f"eth_contract_helpers.py | ERROR in fetch_cnode_futures {single_cnode_fetch_op} generated {exc}"
f"eth_contract_helpers.py | ERROR in fetch_cnode_futures {cn_spID} generated {exc}"
)
return eth_cn_endpoints_set

0 comments on commit f60bffb

Please sign in to comment.