Commit 129c6975397c426e080d65b3e06dd1bf2eba52a7

Angus Gratton 2014-03-06T11:26:55

Drillbit: Fix accidental over-counting of HW errors

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
diff --git a/driver-drillbit.c b/driver-drillbit.c
index 8f42c53..24dfb98 100644
--- a/driver-drillbit.c
+++ b/driver-drillbit.c
@@ -802,10 +802,10 @@ static int check_for_results(struct thr_info *thr)
 			goto cleanup;
 		}
 
+		found = false;
 		for(i = 0; i < response->num_nonces; i++) {
 			if (unlikely(thr->work_restart))
 				goto cleanup;
-			found = false;
 			for(k = 0; k < WORK_HISTORY_LEN; k++) {
 				/* NB we deliberately check all results against all work because sometimes ASICs seem to give multiple "valid" nonces,
 				   and this seems to avoid some result that would otherwise be rejected by the pool.