Skip to content

Commit

Permalink
fix deal making (#232)
Browse files Browse the repository at this point in the history
  • Loading branch information
anjor authored Feb 20, 2025
1 parent 9ec1dfc commit 88b1b09
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions dataprep-tools/filecoin/boost_create_deals.py
Original file line number Diff line number Diff line change
Expand Up @@ -354,10 +354,10 @@ def create_deals_for_metadata(metadata_obj, epoch_str, deal_type_suffix=""):
logger.info(f"Found {len(providers)} providers: {providers}")

for provider in providers:
if file_item["commp_piece_cid"] not in replications:
replications[file_item["commp_piece_cid"]] = []
if not USE_CID_GRAVITY:
if file_item["commp_piece_cid"] not in replications:
replications[file_item["commp_piece_cid"]] = []
elif provider in replications[file_item["commp_piece_cid"]]:
if provider in replications[file_item["commp_piece_cid"]]:
logger.info(f"Skipping deal for {file_item['commp_piece_cid']} with {provider}, already has a deal.")
continue
elif len(replications[file_item["commp_piece_cid"]]) >= replication_factor:
Expand Down

0 comments on commit 88b1b09

Please sign in to comment.