Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 14 additions & 16 deletions chia/plotting/manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -333,22 +333,20 @@ def process_file(file_path: Path) -> Optional[PlotInfo]:
# TODO: consider checking if the file was just written to (which would mean that the file is still
# being copied). A segfault might happen in this edge case.

version_and_size = prover.get_size()
if version_and_size.size_v1 is not None:
k = version_and_size.size_v1
level = prover.get_compression_level()
if level == 0:
if k >= 30 and stat_info.st_size < 0.98 * expected_size:
log.warning(
f"Not farming plot {file_path}. "
f"Size is {stat_info.st_size / (1024**3)} GiB, "
f"but expected at least: {expected_size / (1024**3)} GiB. "
"We assume the file is being copied."
)
return None
else:
# TODO: todo_v2_plots do we need to check v2 plots?
pass
k = prover.get_size()
level = prover.get_compression_level()
if (
level == 0
and stat_info.st_size < 0.98 * expected_size
and ((k.size_v1 is not None and k.size_v1 >= 30) or (k.size_v2 is not None and k.size_v2 >= 28))
):
log.warning(
f"Not farming plot {file_path}. "
f"Size is {stat_info.st_size / (1024**3)} GiB, "
f"but expected at least: {expected_size / (1024**3)} GiB. "
"We assume the file is being copied."
)
return None

cache_entry = CacheEntry.from_prover(prover)
self.cache.update(file_path, cache_entry)
Expand Down
Loading