Browse Source

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

Con Kolivas 14 years ago
parent
commit
0307f9bb4e
1 changed files with 4 additions and 0 deletions
  1. 4 0
      cgminer.c

+ 4 - 0
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)