1
0
mirror of https://github.com/GOSTSec/sgminer synced 2025-01-23 04:54:26 +00:00

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

This commit is contained in:
Con Kolivas 2013-04-06 18:12:45 +11:00
parent ae4ee34ad4
commit 689f744b62

View File

@ -902,6 +902,10 @@ static int64_t avalon_scanhash(struct thr_info *thr)
continue; continue;
} }
if (unlikely(ret == AVA_GETS_RESTART)) { 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; break;
} }
result_count++; result_count++;