Browse Source

Differentiate pool_actively_desired from pool_actively_in_use for cnx_needed

Conflicts:
	miner.c
Luke Dashjr 11 years ago
parent
commit
20c957041f
1 changed files with 8 additions and 2 deletions
  1. 8 2
      miner.c

+ 8 - 2
miner.c

@@ -4054,9 +4054,9 @@ static bool pool_unworkable(const struct pool * const pool)
 }
 
 static
-bool pool_actively_in_use(const struct pool * const pool, const struct pool *cp)
+bool pool_actively_desired(const struct pool * const pool, const struct pool *cp)
 {
-	if (pool_unworkable(pool))
+	if (pool->enabled != POOL_ENABLED)
 		return false;
 	if (pool_strategy == POOL_LOADBALANCE || pool_strategy == POOL_BALANCE)
 		return true;
@@ -4065,6 +4065,12 @@ bool pool_actively_in_use(const struct pool * const pool, const struct pool *cp)
 	return (pool == cp);
 }
 
+static
+bool pool_actively_in_use(const struct pool * const pool, const struct pool *cp)
+{
+	return (!pool_unworkable(pool)) && pool_actively_desired(pool, cp);
+}
+
 /* In balanced mode, the amount of diff1 solutions per pool is monitored as a
  * rolling average per 10 minutes and if pools start getting more, it biases
  * away from them to distribute work evenly. The share count is reset to the