Commit d8de1bbc5baa416148f50938cfde28a5261cb0e1

ckolivas 2012-06-26T13:07:08

Increase the getwork delay factored in to determine if work vs share is stale to avoid too tight timing.

1
2
3
4
5
6
7
8
9
10
11
12
13
diff --git a/cgminer.c b/cgminer.c
index 774c5f6..8ae21dc 100644
--- a/cgminer.c
+++ b/cgminer.c
@@ -2175,7 +2175,7 @@ static bool stale_work(struct work *work, bool share)
 	pool = work->pool;
 	/* Factor in the average getwork delay of this pool, rounding it up to
 	 * the nearest second */
-	getwork_delay = pool->cgminer_pool_stats.getwork_wait_rolling * 5 + 1;
+	getwork_delay = (pool->cgminer_pool_stats.getwork_wait_rolling + 1) * 5;
 	if (!share) {
 		work_expiry -= getwork_delay;
 		if (unlikely(work_expiry < 5))