Reset the icarus failing flag only when a valid nonce is found.
diff --git a/driver-icarus.c b/driver-icarus.c
index 6ab6f3d..1c0846e 100644
--- a/driver-icarus.c
+++ b/driver-icarus.c
@@ -1365,7 +1365,8 @@ static int64_t icarus_scanwork(struct thr_info *thr)
memcpy((char *)&nonce, nonce_bin, ICARUS_READ_SIZE);
nonce = htobe32(nonce);
curr_hw_errors = icarus->hw_errors;
- submit_nonce(thr, work, nonce);
+ if (submit_nonce(thr, work, nonce))
+ info->failing = false;
was_hw_error = (curr_hw_errors > icarus->hw_errors);
hash_count = (nonce & info->nonce_mask);
@@ -1502,8 +1503,6 @@ static int64_t icarus_scanwork(struct thr_info *thr)
out:
free_work(work);
- if (hash_count > 0)
- info->failing = false;
return hash_count;
}