Cryptopp asm32 was not correctly updated to the incremental nonce code so the hash counter was bogus.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49
diff --git a/sha256_cryptopp.c b/sha256_cryptopp.c
index 5a9f00b..c0c1b6f 100644
--- a/sha256_cryptopp.c
+++ b/sha256_cryptopp.c
@@ -102,7 +102,6 @@ bool scanhash_cryptopp(int thr_id, const unsigned char *midstate,
{
uint32_t *hash32 = (uint32_t *) hash;
uint32_t *nonce = (uint32_t *)(data + 12);
- unsigned long stat_ctr = 0;
work_restart[thr_id].restart = 0;
@@ -113,8 +112,6 @@ bool scanhash_cryptopp(int thr_id, const unsigned char *midstate,
runhash(hash1, data, midstate);
runhash(hash, hash1, sha256_init_state);
- stat_ctr++;
-
if (unlikely((hash32[7] == 0) && fulltest(hash, target))) {
*hashes_done = n;
return true;
@@ -587,7 +584,6 @@ bool scanhash_asm32(int thr_id, const unsigned char *midstate,
{
uint32_t *hash32 = (uint32_t *) hash;
uint32_t *nonce = (uint32_t *)(data + 12);
- unsigned long stat_ctr = 0;
work_restart[thr_id].restart = 0;
@@ -598,17 +594,13 @@ bool scanhash_asm32(int thr_id, const unsigned char *midstate,
runhash32(hash1, data, midstate);
runhash32(hash, hash1, sha256_init_state);
- stat_ctr++;
-
if (unlikely((hash32[7] == 0) && fulltest(hash, target))) {
- fulltest(hash, target);
-
- *hashes_done = stat_ctr;
+ *hashes_done = n;
return true;
}
if ((n >= max_nonce) || work_restart[thr_id].restart) {
- *hashes_done = stat_ctr;
+ *hashes_done = n;
return false;
}
}