Browse Source

Use round for displaying current pool diff.

nfactor-troky
Con Kolivas 11 years ago
parent
commit
8ed936330e
  1. 4
      cgminer.c

4
cgminer.c

@ -3077,6 +3077,7 @@ static void calc_diff(struct work *work, int known)
{ {
struct cgminer_pool_stats *pool_stats = &(work->pool->cgminer_pool_stats); struct cgminer_pool_stats *pool_stats = &(work->pool->cgminer_pool_stats);
double difficulty; double difficulty;
int intdiff;
if (opt_scrypt) { if (opt_scrypt) {
uint64_t *data64, d64; uint64_t *data64, d64;
@ -3103,7 +3104,8 @@ static void calc_diff(struct work *work, int known)
difficulty = work->work_difficulty; difficulty = work->work_difficulty;
pool_stats->last_diff = difficulty; pool_stats->last_diff = difficulty;
suffix_string((uint64_t)difficulty, work->pool->diff, sizeof(work->pool->diff), 0); intdiff = round(difficulty);
suffix_string(intdiff, work->pool->diff, sizeof(work->pool->diff), 0);
if (difficulty == pool_stats->min_diff) if (difficulty == pool_stats->min_diff)
pool_stats->min_diff_count++; pool_stats->min_diff_count++;

Loading…
Cancel
Save