mirror of
https://github.com/GOSTSec/sgminer
synced 2025-03-13 06:01:03 +00:00
Never automatically disable any pools but just specify them as idle if they're unresponsive at startup.
This commit is contained in:
parent
324d849bf2
commit
b358bdc07e
10
main.c
10
main.c
@ -4324,11 +4324,12 @@ static bool input_pool(bool live)
|
|||||||
|
|
||||||
pool->tv_idle.tv_sec = ~0UL;
|
pool->tv_idle.tv_sec = ~0UL;
|
||||||
|
|
||||||
/* Test the pool before we enable it if we're live running, otherwise
|
/* Test the pool is not idle if we're live running, otherwise
|
||||||
* it will be tested separately */
|
* it will be tested separately */
|
||||||
ret = true;
|
ret = true;
|
||||||
if (live && pool_active(pool, false))
|
pool->enabled = true;
|
||||||
pool->enabled = true;
|
if (live && !pool_active(pool, false))
|
||||||
|
pool->idle = true;
|
||||||
pools[total_pools++] = pool;
|
pools[total_pools++] = pool;
|
||||||
out:
|
out:
|
||||||
immedok(logwin, false);
|
immedok(logwin, false);
|
||||||
@ -4708,16 +4709,17 @@ int main (int argc, char *argv[])
|
|||||||
struct pool *pool;
|
struct pool *pool;
|
||||||
|
|
||||||
pool = pools[i];
|
pool = pools[i];
|
||||||
|
pool->enabled = true;
|
||||||
if (pool_active(pool, false)) {
|
if (pool_active(pool, false)) {
|
||||||
if (!currentpool)
|
if (!currentpool)
|
||||||
currentpool = pool;
|
currentpool = pool;
|
||||||
applog(LOG_INFO, "Pool %d %s active", pool->pool_no, pool->rpc_url);
|
applog(LOG_INFO, "Pool %d %s active", pool->pool_no, pool->rpc_url);
|
||||||
pools_active++;
|
pools_active++;
|
||||||
pool->enabled = true;
|
|
||||||
} else {
|
} else {
|
||||||
if (pool == currentpool)
|
if (pool == currentpool)
|
||||||
currentpool = NULL;
|
currentpool = NULL;
|
||||||
applog(LOG_WARNING, "Unable to get work from pool %d %s", pool->pool_no, pool->rpc_url);
|
applog(LOG_WARNING, "Unable to get work from pool %d %s", pool->pool_no, pool->rpc_url);
|
||||||
|
pool->idle = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user