Allow pool active to be called on stratum or disabled pools in the watchpool thread if the pool has not been probed.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37
diff --git a/cgminer.c b/cgminer.c
index 32573c4..057d867 100644
--- a/cgminer.c
+++ b/cgminer.c
@@ -5947,7 +5947,16 @@ static void *watchpool_thread(void __maybe_unused *userdata)
if (!opt_benchmark)
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;
/* Stratum works off pushing work, but GBT and getwork
@@ -5967,14 +5976,6 @@ static void *watchpool_thread(void __maybe_unused *userdata)
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) {