Commit d39e5abfba72bdc63fbf497181a2d4574dcb68cf

Con Kolivas 2011-08-12T21:22:47

We can't hit this path since the earlier check for stale work will prevent us ever finding work it can roll here.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
diff --git a/main.c b/main.c
index db7e268..7b12fd5 100644
--- a/main.c
+++ b/main.c
@@ -2445,16 +2445,6 @@ static bool divide_work(struct timeval *now, struct work *work, uint32_t hash_di
 
 	hash_inc = MAXTHREADS / hash_div * 2;
 	if ((uint64_t)work->blk.nonce + hash_inc < MAXTHREADS) {
-		/* Don't keep handing it out if it's getting old, but try to
-		 * roll it instead */
-		if ((now->tv_sec - work->tv_staged.tv_sec) > opt_scantime) {
-			if (!can_roll(work))
-				return false;
-			else {
-				roll_work(work);
-				return true;
-			}
-		}
 		/* Okay we can divide it up */
 		work->blk.nonce += hash_inc;
 		work->cloned = true;