Commit 438a3e9929f6441b95386ec2a6fc66d0c78b41cd

Kano 2014-02-25T12:28:03

Icarus - ignore HW errors in hash rate ... and fix detection of them

diff --git a/driver-icarus.c b/driver-icarus.c
index 9f78886..ba0954d 100644
--- a/driver-icarus.c
+++ b/driver-icarus.c
@@ -1367,11 +1367,15 @@ static int64_t icarus_scanwork(struct thr_info *thr)
 	curr_hw_errors = icarus->hw_errors;
 	if (submit_nonce(thr, work, nonce))
 		info->failing = false;
-	was_hw_error = (curr_hw_errors > icarus->hw_errors);
+	was_hw_error = (curr_hw_errors < icarus->hw_errors);
 
-	hash_count = (nonce & info->nonce_mask);
-	hash_count++;
-	hash_count *= info->fpga_count;
+	if (was_hw_error)
+		hash_count = 0;
+	else {
+		hash_count = (nonce & info->nonce_mask);
+		hash_count++;
+		hash_count *= info->fpga_count;
+	}
 
 #if 0
 	// This appears to only return zero nonce values