Browse Source

logs: prevent multiple warnings

master
Tanguy Pruvot 10 years ago
parent
commit
bec89724d5
  1. 2
      ccminer.cpp
  2. 3
      util.cpp

2
ccminer.cpp

@ -555,7 +555,7 @@ static int share_result(int result, const char *reason)
applog(LOG_WARNING, "factor reduced to : %0.2f", opt_difficulty); applog(LOG_WARNING, "factor reduced to : %0.2f", opt_difficulty);
return 0; 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"); applog(LOG_WARNING, "enabling duplicates check feature");
check_dups = true; check_dups = true;
} }

3
util.cpp

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

Loading…
Cancel
Save