mirror of
https://github.com/GOSTSec/sgminer
synced 2025-01-11 07:17:58 +00:00
Allow pool active to be called on stratum or disabled pools in the watchpool thread if the pool has not been probed.
This commit is contained in:
parent
52b4bae961
commit
c0cd006f42
19
cgminer.c
19
cgminer.c
@ -6045,7 +6045,16 @@ static void *watchpool_thread(void __maybe_unused *userdata)
|
|||||||
if (!opt_benchmark)
|
if (!opt_benchmark)
|
||||||
reap_curl(pool);
|
reap_curl(pool);
|
||||||
|
|
||||||
if (pool->enabled == POOL_DISABLED || pool->has_stratum)
|
/* Get a rolling utility per pool over 10 mins */
|
||||||
|
if (intervals > 19) {
|
||||||
|
int shares = pool->diff1 - pool->last_shares;
|
||||||
|
|
||||||
|
pool->last_shares = pool->diff1;
|
||||||
|
pool->utility = (pool->utility + (double)shares * 0.63) / 1.63;
|
||||||
|
pool->shares = pool->utility;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ((pool->enabled == POOL_DISABLED || pool->has_stratum) && pool->probed)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
/* Test pool is idle once every minute */
|
/* Test pool is idle once every minute */
|
||||||
@ -6055,14 +6064,6 @@ static void *watchpool_thread(void __maybe_unused *userdata)
|
|||||||
pool_resus(pool);
|
pool_resus(pool);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Get a rolling utility per pool over 10 mins */
|
|
||||||
if (intervals > 19) {
|
|
||||||
int shares = pool->diff1 - pool->last_shares;
|
|
||||||
|
|
||||||
pool->last_shares = pool->diff1;
|
|
||||||
pool->utility = (pool->utility + (double)shares * 0.63) / 1.63;
|
|
||||||
pool->shares = pool->utility;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (pool_strategy == POOL_ROTATE && now.tv_sec - rotate_tv.tv_sec > 60 * opt_rotate_period) {
|
if (pool_strategy == POOL_ROTATE && now.tv_sec - rotate_tv.tv_sec > 60 * opt_rotate_period) {
|
||||||
|
Loading…
Reference in New Issue
Block a user