Skip to content

Commit

Permalink
add: copyright
Browse files Browse the repository at this point in the history
  • Loading branch information
cryptozeny committed Jul 25, 2018
1 parent fd962bc commit fc399ff
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions cpu-miner.c
Expand Up @@ -686,8 +686,8 @@ static void share_result(int result, const char *reason)
result ? accepted_count++ : rejected_count++;
pthread_mutex_unlock(&stats_lock);

sprintf(s, hashrate >= 1e6 ? "%.0f" : "%.2f", 1e-3 * hashrate);
applog(LOG_INFO, "accepted: %lu/%lu (%.2f%%), %s khash/s %s",
sprintf(s, hashrate >= 1e6 ? "%.0f" : "%.4f", 1e-3 * hashrate);
applog(LOG_INFO, "accepted: %lu/%lu (%.2f%%), %s kH/s %s",
accepted_count,
accepted_count + rejected_count,
100. * accepted_count / (accepted_count + rejected_count),
Expand Down Expand Up @@ -1278,18 +1278,18 @@ static void *miner_thread(void *userdata)
pthread_mutex_unlock(&stats_lock);
}
if (!opt_quiet) {
sprintf(s, thr_hashrates[thr_id] >= 1e6 ? "%.0f" : "%.2f",
sprintf(s, thr_hashrates[thr_id] >= 1e6 ? "%.0f" : "%.4f",
1e-3 * thr_hashrates[thr_id]);
applog(LOG_INFO, "thread %d: %lu hashes, %s khash/s",
applog(LOG_INFO, "thread %d: %lu hashes, %s kH/s",
thr_id, hashes_done, s);
}
if (opt_benchmark && thr_id == opt_n_threads - 1) {
double hashrate = 0.;
for (i = 0; i < opt_n_threads && thr_hashrates[i]; i++)
hashrate += thr_hashrates[i];
if (i == opt_n_threads) {
sprintf(s, hashrate >= 1e6 ? "%.0f" : "%.2f", 1e-3 * hashrate);
applog(LOG_INFO, "Total: %s khash/s", s);
sprintf(s, hashrate >= 1e6 ? "%.0f" : "%.4f", 1e-3 * hashrate);
applog(LOG_INFO, "Total: %s kH/s", s);
}
}

Expand Down Expand Up @@ -1914,7 +1914,9 @@ static void signal_handler(int sig)
static void show_credits()
{
printf("** " PACKAGE_NAME " " PACKAGE_VERSION " by macchky@github **\n");
printf("ZNY donation address: Zq83XMtc9gShkgi4bNNHWA4FDbMe8dFQmD (macchky)\n\n");
printf("ZNY donation address: Zq83XMtc9gShkgi4bNNHWA4FDbMe8dFQmD (macchky)\n");
printf("** yespower 0.5 support by cryptozeny@github **\n");
printf("ZNY donation address: ZyWJL5qp3qZQW85HVoT3ba2feJYsZ7aQ2v (cryptozeny)\n\n");
}

int main(int argc, char *argv[])
Expand Down

0 comments on commit fc399ff

Please sign in to comment.