Skip to content

Commit

Permalink
fix plot dupe (Chia-Network#3154)
Browse files Browse the repository at this point in the history
  • Loading branch information
wjblanke committed Apr 30, 2021
1 parent 17c45bf commit 10dce11
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion chia/plotting/plot_tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -178,9 +178,12 @@ def process_file(filename: Path) -> Tuple[int, Dict]:
log.error(f"Failed to open file {filename}. {e}")
return 0, new_provers
if stat_info.st_mtime == provers[filename].time_modified:
new_provers[filename] = provers[filename]
with plot_ids_lock:
if provers[filename].prover.get_id() in plot_ids:
log.warning(f"Have multiple copies of the plot {filename}, not adding it.")
return 0, new_provers
plot_ids.add(provers[filename].prover.get_id())
new_provers[filename] = provers[filename]
return stat_info.st_size, new_provers
try:
prover = DiskProver(str(filename))
Expand Down

0 comments on commit 10dce11

Please sign in to comment.