Commit 689f744b620d8f4a064dcdfe5b9256a165ef50d0

Con Kolivas 2013-04-06T18:12:45

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

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
diff --git a/driver-avalon.c b/driver-avalon.c
index 3e19996..14966b1 100644
--- a/driver-avalon.c
+++ b/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++;