Skip to content

Commit 6dbc6cf

Browse files
committed
fix validation
1 parent 9a0b4fd commit 6dbc6cf

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

src/finder.cpp

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -203,8 +203,8 @@ std::pair<std::string, Program> Finder::checkProgramBasic(
203203
if (!is_new) {
204204
// check if another miner already submitted a program for this sequence
205205
if (change_type == first) {
206-
Log::get().warn("Skipping update of " + seq.id_str() +
207-
" because program is not new");
206+
Log::get().debug("Skipping update of " + seq.id_str() +
207+
" because program is not new");
208208
return result;
209209
}
210210
// fall back to default validation if metadata is missing
@@ -216,8 +216,8 @@ std::pair<std::string, Program> Finder::checkProgramBasic(
216216
}
217217
// compare with hash of existing program
218218
if (previous_hash != ProgramUtil::hash(existing)) {
219-
Log::get().warn("Skipping update of " + seq.id_str() +
220-
" because of hash mismatch");
219+
Log::get().debug("Skipping update of " + seq.id_str() +
220+
" because of hash mismatch");
221221
return result;
222222
}
223223
}
@@ -353,12 +353,12 @@ std::string Finder::isOptimizedBetter(Program existing, Program optimized,
353353
const auto existing_steps = evaluator.eval(existing, tmp, num_terms, false);
354354

355355
// compare number of successfully computed terms
356-
int64_t existing_runs = existing_steps.runs;
357-
int64_t optimized_runs = static_cast<int64_t>(
358-
static_cast<double>(optimized_steps.runs) * THRESHOLD_BETTER);
359-
if (optimized_runs > existing_runs) {
356+
int64_t existing_terms = static_cast<int64_t>(
357+
static_cast<double>(existing_steps.runs) * THRESHOLD_BETTER);
358+
int64_t optimized_terms = optimized_steps.runs;
359+
if (optimized_terms > existing_terms) {
360360
return "Better";
361-
} else if (optimized_runs < existing_runs) {
361+
} else if (optimized_terms < existing_terms) {
362362
return not_better; // worse
363363
}
364364

0 commit comments

Comments
 (0)