mirror of
https://github.com/GOSTSec/sgminer
synced 2025-01-30 16:34:23 +00:00
log: do not show pool difficulty changes on non-current pool.
Keep log spam down when using a lot of vardiff pools, or if a p2pool is a fallback.
This commit is contained in:
parent
4c64a192f7
commit
cabb02f5d4
@ -48,7 +48,6 @@ static void my_log_curses(int prio, const char *datetime, const char *str, bool
|
||||
}
|
||||
|
||||
/* high-level logging function, based on global opt_log_level */
|
||||
|
||||
void applog(int prio, const char* fmt, ...) {
|
||||
va_list args;
|
||||
|
||||
|
4
util.c
4
util.c
@ -1655,9 +1655,9 @@ static bool parse_diff(struct pool *pool, json_t *val)
|
||||
int idiff = diff;
|
||||
|
||||
if ((double)idiff == diff)
|
||||
applog(LOG_NOTICE, "%s difficulty changed to %d", get_pool_name(pool), idiff);
|
||||
applog(pool == current_pool() ? LOG_NOTICE : LOG_DEBUG, "%s difficulty changed to %d", get_pool_name(pool), idiff);
|
||||
else
|
||||
applog(LOG_NOTICE, "%s difficulty changed to %.1f", get_pool_name(pool), diff);
|
||||
applog(pool == current_pool() ? LOG_NOTICE : LOG_DEBUG, "%s difficulty changed to %.1f", get_pool_name(pool), diff);
|
||||
} else
|
||||
applog(LOG_DEBUG, "%s difficulty set to %f", pool->name, diff);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user