Commit 0307f9bb4e464e6826f13b8c428ff3306d3960fc

Con Kolivas 2012-02-06T10:37:29

Give rolled work a new ID to make sure there is no confusion in the hashtable lookups.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
diff --git a/cgminer.c b/cgminer.c
index 430ce25..2b7a20e 100644
--- a/cgminer.c
+++ b/cgminer.c
@@ -2974,6 +2974,10 @@ static void roll_work(struct work *work)
 	work->blk.nonce = 0;
 	if (opt_debug)
 		applog(LOG_DEBUG, "Successfully rolled work");
+
+	/* This is now a different work item so it needs a different ID for the
+	 * hashtable */
+	work->id = total_work++;
 }
 
 static bool divide_work(struct work *work)