1
0
mirror of https://github.com/GOSTSec/ccminer synced 2025-02-05 11:24:22 +00:00

logs: prevent multiple warnings

This commit is contained in:
Tanguy Pruvot 2015-01-22 05:55:50 +01:00
parent cafd4477d7
commit bec89724d5
2 changed files with 5 additions and 4 deletions

View File

@ -555,7 +555,7 @@ static int share_result(int result, const char *reason)
applog(LOG_WARNING, "factor reduced to : %0.2f", opt_difficulty);
return 0;
}
if (strncmp(reason, "Duplicate share", 15) == 0) {
if (strncmp(reason, "Duplicate share", 15) == 0 && !check_dups) {
applog(LOG_WARNING, "enabling duplicates check feature");
check_dups = true;
}

View File

@ -1287,9 +1287,10 @@ static bool stratum_set_difficulty(struct stratum_ctx *sctx, json_t *params)
pthread_mutex_unlock(&sctx->work_lock);
/* store for api stats */
global_diff = diff;
applog(LOG_WARNING, "Stratum difficulty set to %g", diff);
if (diff != global_diff) {
global_diff = diff;
applog(LOG_WARNING, "Stratum difficulty set to %g", diff);
}
return true;
}