Commit 8ff12c82cbe6b96dcd20fd5c97de25e598bc00c1

Con Kolivas 2012-12-04T21:49:11

Allow pool active to be called on stratum or disabled pools in the watchpool thread if the pool has not been probed.

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) {