1
0
mirror of https://github.com/GOSTSec/sgminer synced 2025-01-22 20:44:19 +00:00

If shares are known stale, don't use them to decide to disable a pool for sequential rejects.

This commit is contained in:
Con Kolivas 2012-05-31 08:41:56 +10:00
parent 07212db106
commit 85210ee7a8
2 changed files with 7 additions and 2 deletions

View File

@ -1725,8 +1725,10 @@ static bool submit_upstream_work(const struct work *work, CURL *curl)
/* Once we have more than a nominal amount of sequential rejects, /* Once we have more than a nominal amount of sequential rejects,
* at least 10 and more than 3 mins at the current utility, * at least 10 and more than 3 mins at the current utility,
* disable the pool because some pool error is likely to have * disable the pool because some pool error is likely to have
* ensued. */ * ensued. Do not do this if we know the share just happened to
if (pool->seq_rejects > 10 && opt_disable_pool && total_pools > 1) { * be stale due to networking delays.
*/
if (pool->seq_rejects > 10 && !work->stale && opt_disable_pool && total_pools > 1) {
double utility = total_accepted / ( total_secs ? total_secs : 1 ) * 60; double utility = total_accepted / ( total_secs ? total_secs : 1 ) * 60;
if (pool->seq_rejects > utility * 3) { if (pool->seq_rejects > utility * 3) {
@ -2161,6 +2163,7 @@ static void *submit_work_thread(void *userdata)
pool->stale_shares++; pool->stale_shares++;
goto out; goto out;
} }
work->stale = true;
} }
ce = pop_curl_entry(pool); ce = pop_curl_entry(pool);

View File

@ -716,11 +716,13 @@ struct work {
int thr_id; int thr_id;
struct pool *pool; struct pool *pool;
struct timeval tv_staged; struct timeval tv_staged;
bool mined; bool mined;
bool clone; bool clone;
bool cloned; bool cloned;
bool rolltime; bool rolltime;
bool longpoll; bool longpoll;
bool stale;
unsigned int work_block; unsigned int work_block;
int id; int id;