Skip to content

Commit

Permalink
i
Browse files Browse the repository at this point in the history
  • Loading branch information
wjblanke committed Sep 24, 2024
1 parent 249cafe commit fcff8c9
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions src/prover_slow.h
Original file line number Diff line number Diff line change
Expand Up @@ -115,13 +115,16 @@ std::vector<uint8_t> ProveSlow(integer& D, form& x, uint64_t num_iterations, std

// Check for cancellation every 65535 interations
if ((i&0xffff)==0) {
struct stat buffer;
char sz[200];
sprintf(sz,"num_iterations %llu shutdown_file_path.c_str() %s",i,shutdown_file_path.c_str());
logit(sz);
if ((shutdown_file_path!="") && (stat (shutdown_file_path.c_str(), &buffer) != 0))
logit("aborting");
return {};
// Only if we have a shutdown path
if (shutdown_file_path!="") {
struct stat buffer;
logit(shutdown_file_path.c_str());

if (stat (shutdown_file_path.c_str(), &buffer) != 0)) {
logit("aborting");
return {};
}
}
}
}

Expand Down

0 comments on commit fcff8c9

Please sign in to comment.