diff --git a/coordinator/test/api_test.go b/coordinator/test/api_test.go index e26a08ac43..75b4971d83 100644 --- a/coordinator/test/api_test.go +++ b/coordinator/test/api_test.go @@ -330,12 +330,12 @@ func testValidProof(t *testing.T) { provers[i] = newMockProver(t, "prover_test"+strconv.Itoa(i), coordinatorURL, proofType, version.Version) - proofStatus := verifiedSuccess + exceptProofStatus := verifiedSuccess proverTask, errCode, errMsg := provers[i].getProverTask(t, proofType) assert.Equal(t, types.Success, errCode) assert.Equal(t, "", errMsg) assert.NotNil(t, proverTask) - provers[i].submitProof(t, proverTask, proofStatus, types.Success) + provers[i].submitProof(t, proverTask, exceptProofStatus, types.Success) } // verify proof status diff --git a/database/migrate/migrations/00021_bundle.sql b/database/migrate/migrations/00021_bundle.sql index 5dd8ae49a7..c4007b5322 100644 --- a/database/migrate/migrations/00021_bundle.sql +++ b/database/migrate/migrations/00021_bundle.sql @@ -38,6 +38,9 @@ CREATE INDEX idx_bundle_index_desc ON bundle(index DESC) WHERE deleted_at IS NUL CREATE INDEX idx_bundle_batch_proofs_status ON bundle(batch_proofs_status) WHERE deleted_at IS NULL; CREATE INDEX idx_bundle_start_batch_index ON bundle(start_batch_index) WHERE deleted_at IS NULL; CREATE INDEX idx_bundle_end_batch_index ON bundle(end_batch_index) WHERE deleted_at IS NULL; +create index idx_bundle_total_attempts_active_attempts_batch_proofs_status + on bundle (total_attempts, active_attempts, batch_proofs_status) + where deleted_at IS NULL; COMMENT ON COLUMN bundle.batch_proofs_status IS 'undefined, pending, ready'; COMMENT ON COLUMN bundle.proving_status IS 'undefined, unassigned, assigned, proved (deprecated), verified, failed';