Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix deadlock in vdf_client #97

Merged
merged 1 commit into from Mar 28, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/vdf.h
Expand Up @@ -242,9 +242,11 @@ void repeated_square(form f, const integer& D, const integer& L,
Proof ProveOneWesolowski(uint64_t iters, integer& D, form f, OneWesolowskiCallback* weso,
std::atomic<bool>& stopped)
{
while (weso->iterations < iters) {
while (!stopped && weso->iterations < iters) {
this_thread::sleep_for(1s);
}
if (stopped)
return Proof();
Segment sg(
/*start=*/0,
/*length=*/iters,
Expand Down