Browse Source

Count an invalid nonce count as a hardware error on opencl.

nfactor-troky
Con Kolivas 12 years ago
parent
commit
2b6e3676cd
  1. 7
      findnonce.c

7
findnonce.c

@ -254,7 +254,14 @@ static void *postcalc_hash(void *userdata)
/* To prevent corrupt values in FOUND from trying to read beyond the /* To prevent corrupt values in FOUND from trying to read beyond the
* end of the res[] array */ * end of the res[] array */
if (unlikely(pcd->res[FOUND] & ~FOUND)) {
applog(LOG_WARNING, "%s%d: invalid nonce count - HW error",
thr->cgpu->api->name, thr->cgpu->device_id);
hw_errors++;
thr->cgpu->hw_errors++;
pcd->res[FOUND] &= FOUND; pcd->res[FOUND] &= FOUND;
}
for (entry = 0; entry < pcd->res[FOUND]; entry++) { for (entry = 0; entry < pcd->res[FOUND]; entry++) {
uint32_t nonce = pcd->res[entry]; uint32_t nonce = pcd->res[entry];

Loading…
Cancel
Save