Commit 418d15deba88fad1057a8c0fa2f20117ec939e80

Con Kolivas 2012-11-06T09:43:55

Only retrieve a new block template for GBT pools that are the current pool.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
diff --git a/cgminer.c b/cgminer.c
index 9d8e96a..529333e 100644
--- a/cgminer.c
+++ b/cgminer.c
@@ -5864,7 +5864,8 @@ static void *watchpool_thread(void __maybe_unused *userdata)
 			 * template if more than 30 seconds has elapsed since
 			 * the last one to keep the data current and as a test
 			 * for when the pool dies. */
-			if (!pool->idle && pool->has_gbt && now.tv_sec - pool->tv_template.tv_sec > 60) {
+			if (!pool->idle && pool->has_gbt && pool == current_pool() &&
+			    now.tv_sec - pool->tv_template.tv_sec > 60) {
 				if (!pool_active(pool, true))
 					pool_died(pool);
 			}