Skip to content

Commit

Permalink
Cleaner
Browse files Browse the repository at this point in the history
  • Loading branch information
Ravencoin-Miner committed May 5, 2018
1 parent 47959f5 commit 076bbaf
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
14 changes: 7 additions & 7 deletions ccminer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ bool use_colors = true;
int use_pok = 0;
static bool opt_background = false;
bool opt_quiet = false;
int opt_maxlograte = 3;
int opt_maxlograte = 60;
static int opt_retries = -1;
static int opt_fail_pause = 30;
int opt_time_limit = -1;
Expand Down Expand Up @@ -884,7 +884,7 @@ int share_result(int result, int pooln, double sharediff, const char *reason)
global_hashrate = llround(hashrate);

format_hashrate(hashrate, s);
if (opt_showdiff)
if (!opt_showdiff)
sprintf(suppl, "diff %.3f", sharediff);
else // accepted percent
sprintf(suppl, "%.2f%%", 100. * p->accepted_count / (p->accepted_count + p->rejected_count));
Expand Down Expand Up @@ -919,16 +919,16 @@ int share_result(int result, int pooln, double sharediff, const char *reason)
RVN = (0.1005813032)*(hashrate)/(net_diff);
ravencolorcounter = rand() % 3;
if (ravencolorcounter == 0) {
applog(LOG_NOTICE, /*CL_MA2*/ "RVN/day: %.3f RVN", RVN); //blue-purple
applog(LOG_NOTICE, CL_MA2 "RVN/day: %.3f RVN", RVN); //blue-purple
}
if (ravencolorcounter == 1) {
applog(LOG_NOTICE, /*CL_RD2*/ "RVN/day: %.3f RVN", RVN); //red
applog(LOG_NOTICE, CL_RD2 "RVN/day: %.3f RVN", RVN); //red
}
if (ravencolorcounter == 2) {
applog(LOG_NOTICE, /*CL_GR2*/ "RVN/day: %.3f RVN", RVN); //orange
applog(LOG_NOTICE, CL_GR2 "RVN/day: %.3f RVN", RVN); //orange
}
if (ravencolorcounter != 0 && ravencolorcounter != 1 && ravencolorcounter != 2) {
applog(LOG_NOTICE, /*CL_MA2*/ "RVN/day: %.3f RVN", RVN); //blue-purple
applog(LOG_NOTICE, CL_MA2 "RVN/day: %.3f RVN", RVN); //blue-purple
}
}

Expand Down Expand Up @@ -2228,7 +2228,7 @@ static bool stratum_gen_work(struct stratum_ctx *sctx, struct work *work)
stratum_diff = sctx->job.diff;
if (opt_showdiff && work->targetdiff != stratum_diff)
snprintf(sdiff, 32, " (%.5f)", work->targetdiff);
applog(LOG_WARNING, "Stratum difficulty set to %g%s", stratum_diff, sdiff);
applog(LOG_WARNING, "Stratum difficulty set to %g", stratum_diff);
}
sctx->job.clean = 1; //!!!
return true;
Expand Down
6 changes: 3 additions & 3 deletions nvml.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2253,13 +2253,13 @@ void *monitor_thread(void *userdata)
khs_per_watt = khs_per_watt / ((double)power / counter);
format_hashrate(khs_per_watt * 1000, khw);
if (strlen(khw))
sprintf(&khw[strlen(khw)-1], "W Power: %uW ", cgpu->monitor.gpu_power / 1000); //POWER:
sprintf(&khw[strlen(khw)-1], "W | %uW", cgpu->monitor.gpu_power / 1000); //POWER:
}

if (opt_hwmonitor && (time(NULL) - cgpu->monitor.tm_displayed) > 60) {
gpulog(LOG_INFO, thr_id, "Efficiency: %s", //Efficiency:
gpulog(LOG_INFO, thr_id, "%s | %d°C", //Efficiency:
/*cgpu->monitor.gpu_clock, cgpu->monitor.gpu_memclock,*/
khw/*, cgpu->monitor.gpu_temp, cgpu->monitor.gpu_fan*/
khw, cgpu->monitor.gpu_temp/*, cgpu->monitor.gpu_fan*/
);
cgpu->monitor.tm_displayed = (uint32_t)time(NULL);
}
Expand Down

0 comments on commit 076bbaf

Please sign in to comment.