From 3691403f4182b0f2c87b5f00290eb536e2f4d49d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Magiera?= Date: Sat, 12 Oct 2024 18:12:08 +0200 Subject: [PATCH] pdp: An actually working poller this time --- tasks/pdp/proofset_challenge_watch.go | 2 +- tasks/pdp/prove_task.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tasks/pdp/proofset_challenge_watch.go b/tasks/pdp/proofset_challenge_watch.go index fb55ca1ce..d5511694e 100644 --- a/tasks/pdp/proofset_challenge_watch.go +++ b/tasks/pdp/proofset_challenge_watch.go @@ -115,7 +115,7 @@ func updateNextChallengeEpoch( _, err = db.Exec(ctx, ` UPDATE pdp_proof_sets SET next_challenge_epoch = $1, next_challenge_possible = TRUE - WHERE id = $2 AND next_challenge_epoch IS NULL + WHERE id = $2 AND next_challenge_possible = FALSE `, nextChallengeEpochBigInt.Int64(), ps.ID) if err != nil { return xerrors.Errorf("failed to update next_challenge_epoch for proof set %d: %w", ps.ID, err) diff --git a/tasks/pdp/prove_task.go b/tasks/pdp/prove_task.go index e3df979d0..b2d26b70a 100644 --- a/tasks/pdp/prove_task.go +++ b/tasks/pdp/prove_task.go @@ -172,7 +172,7 @@ func (p *ProveTask) Do(taskID harmonytask.TaskID, stillOwned func() bool) (done } // Number of challenges to generate - numChallenges := 1 // Application / pdp will specify this later + numChallenges := 5 // Application / pdp will specify this later proofs, err := p.GenerateProofs(ctx, pdpService, proofSetID, challengeEpoch, numChallenges) if err != nil {