Browse Source

Fix CPU mining with other algorithms not working.

nfactor-troky
Con Kolivas 14 years ago
parent
commit
0c49935250
  1. 4
      sha256_cryptopp.c
  2. 4
      sha256_generic.c
  3. 4
      sha256_via.c

4
sha256_cryptopp.c

@ -116,12 +116,12 @@ bool scanhash_cryptopp(int thr_id, const unsigned char *midstate, @@ -116,12 +116,12 @@ bool scanhash_cryptopp(int thr_id, const unsigned char *midstate,
stat_ctr++;
if (unlikely((hash32[7] == 0) && 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;
}
}

4
sha256_generic.c

@ -261,12 +261,12 @@ bool scanhash_c(int thr_id, const unsigned char *midstate, unsigned char *data, @@ -261,12 +261,12 @@ bool scanhash_c(int thr_id, const unsigned char *midstate, unsigned char *data,
stat_ctr++;
if (unlikely((hash32[7] == 0) && 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;
}
}

4
sha256_via.c

@ -70,12 +70,12 @@ bool scanhash_via(int thr_id, unsigned char *data_inout, @@ -70,12 +70,12 @@ bool scanhash_via(int thr_id, unsigned char *data_inout,
dout32[i] = swab32(data32[i]);
}
*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;
}
}

Loading…
Cancel
Save