Browse Source

Merge commit '3d1e9f5' into cg_merges_20121208

Luke Dashjr 13 years ago
parent
commit
7eea71e5b1
1 changed files with 6 additions and 0 deletions
  1. 6 0
      miner.c

+ 6 - 0
miner.c

@@ -3434,6 +3434,11 @@ static void *getwork_thread(void __maybe_unused *userdata)
 
 		work = make_work();
 
+		if (lagging && !pool_tset(cp, &cp->lagging)) {
+			applog(LOG_WARNING, "Pool %d not providing work fast enough", cp->pool_no);
+			cp->getfail_occasions++;
+			total_go++;
+		}
 		pool = select_pool(lagging);
 retry:
 		if (pool->has_stratum) {
@@ -3507,6 +3512,7 @@ retry:
 			pool = select_pool(true);
 			goto retry;
 		}
+		pool_tclear(pool, &pool->lagging);
 		applog(LOG_DEBUG, "Generated getwork work");
 		stage_work(work);
 		push_curl_entry(ce, pool);