Browse Source

Reset the result_wrong count on block change in avalon scanhash to prevent false positives for all nonces failed.

Con Kolivas 13 years ago
parent
commit
689f744b62
1 changed files with 4 additions and 0 deletions
  1. 4 0
      driver-avalon.c

+ 4 - 0
driver-avalon.c

@@ -902,6 +902,10 @@ static int64_t avalon_scanhash(struct thr_info *thr)
 			continue;
 		}
 		if (unlikely(ret == AVA_GETS_RESTART)) {
+			/* Reset the wrong count in case there has only been
+			 * a small number of nonces tested before the restart.
+			 */
+			result_wrong = 0;
 			break;
 		}
 		result_count++;