Skip to content

Commit cd8a626

Browse files
committed
Hardcode empty buckets, for now
1 parent ba824e9 commit cd8a626

1 file changed

Lines changed: 17 additions & 16 deletions

File tree

porter/main.py

Lines changed: 17 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -460,22 +460,23 @@ def __init__(self, _reservoir, need_successes: int):
460460
self.selected_nodes = dict() # <checksum address> -> <bucket>
461461

462462
def read_buckets(self) -> Dict:
463-
try:
464-
response = requests.get(self.BUCKETS_URL)
465-
except requests.exceptions.ConnectionError as ex:
466-
error = f"Failed to fetch buckets JSON file from {self.BUCKETS_URL}: {str(ex)}"
467-
raise RuntimeError(error)
468-
469-
if response.status_code != 200:
470-
error = f"Failed to fetch buckets JSON file from {self.BUCKETS_URL} with status code {response.status_code}"
471-
raise RuntimeError(error)
472-
473-
try:
474-
buckets = response.json()
475-
except JSONDecodeError:
476-
raise RuntimeError(
477-
f"Invalid buckets JSON file at '{self.BUCKETS_URL}'."
478-
)
463+
# try:
464+
# response = requests.get(self.BUCKETS_URL)
465+
# except requests.exceptions.ConnectionError as ex:
466+
# error = f"Failed to fetch buckets JSON file from {self.BUCKETS_URL}: {str(ex)}"
467+
# raise RuntimeError(error)
468+
469+
# if response.status_code != 200:
470+
# error = f"Failed to fetch buckets JSON file from {self.BUCKETS_URL} with status code {response.status_code}"
471+
# raise RuntimeError(error)
472+
473+
# try:
474+
# buckets = response.json()
475+
# except JSONDecodeError:
476+
# raise RuntimeError(
477+
# f"Invalid buckets JSON file at '{self.BUCKETS_URL}'."
478+
# )
479+
buckets = {} # Placeholder for buckets
479480
return buckets
480481

481482
def find_bucket(self, node):

0 commit comments

Comments
 (0)