From 611b370255c9fb59c35e927a012f85e1222622b0 Mon Sep 17 00:00:00 2001 From: ystarnaud Date: Wed, 12 Nov 2014 14:54:18 -0500 Subject: [PATCH] Fix for random HW errors A typo when checking the algorithm used was causing the diff1targ value not to evaluate properly in test_nonce(). This caused the test to fail and increase HW errors. Thanks to Zuikkis for pointing that out! --- sgminer.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sgminer.c b/sgminer.c index 5235de97..0458ce33 100644 --- a/sgminer.c +++ b/sgminer.c @@ -6833,8 +6833,8 @@ bool test_nonce(struct work *work, uint32_t nonce) applog(LOG_DEBUG, "test_nonce() algorithm = %s", work->pool->algorithm.name); - // for Neoscrypt, the diff1targe value is in work->target - if ((work->pool->algorithm.name, "neoscrypt")) { + // for Neoscrypt, the diff1targ value is in work->target + if (!safe_cmp(work->pool->algorithm.name, "neoscrypt")) { diff1targ = ((uint32_t *)work->target)[7]; } else {