mirror of
https://github.com/GOSTSec/sgminer
synced 2025-01-22 20:44:19 +00:00
Show an integer only for diff if it is one.
This commit is contained in:
parent
a36e55b754
commit
1b5ea442b8
16
util.c
16
util.c
@ -1310,10 +1310,18 @@ static bool parse_diff(struct pool *pool, json_t *val)
|
|||||||
pool->swork.diff = diff;
|
pool->swork.diff = diff;
|
||||||
cg_wunlock(&pool->data_lock);
|
cg_wunlock(&pool->data_lock);
|
||||||
|
|
||||||
if (old_diff != diff)
|
if (old_diff != diff) {
|
||||||
applog(LOG_NOTICE, "Pool %d difficulty changed to %f", pool->pool_no, diff);
|
int idiff = diff;
|
||||||
else
|
|
||||||
applog(LOG_DEBUG, "Pool %d difficulty set to %f", pool->pool_no, diff);
|
if ((double)idiff == diff)
|
||||||
|
applog(LOG_NOTICE, "Pool %d difficulty changed to %d",
|
||||||
|
pool->pool_no, idiff);
|
||||||
|
else
|
||||||
|
applog(LOG_NOTICE, "Pool %d difficulty changed to %f",
|
||||||
|
pool->pool_no, diff);
|
||||||
|
} else
|
||||||
|
applog(LOG_DEBUG, "Pool %d difficulty set to %f", pool->pool_no,
|
||||||
|
diff);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user