Browse Source

driver-ztex: search the complete noncerange based on the actual speed

search the complete noncerange until the range to the end is more
work than at the last round. doing one more round would mean we
would have a overrun, which is a waste.

with actual ztex boards this means that a new getwork is needed
every 19 seconds in general and not every 10 seconds (without
rollntime).
nfactor-troky
Denis Ahrens 12 years ago
parent
commit
7c01f16593
  1. 2
      driver-ztex.c

2
driver-ztex.c

@ -282,7 +282,7 @@ static int64_t ztex_scanhash(struct thr_info *thr, struct work *work,
#endif #endif
if (nonce > noncecnt) if (nonce > noncecnt)
noncecnt = nonce; noncecnt = nonce;
if (((nonce & 0x7fffffff) >> 4) < ((lastnonce[i] & 0x7fffffff) >> 4)) { if (((0xffffffff - nonce) < (nonce - lastnonce[i])) || nonce < lastnonce[i]) {
applog(LOG_DEBUG, "%s: overflow nonce=%0.8x lastnonce=%0.8x", ztex->repr, nonce, lastnonce[i]); applog(LOG_DEBUG, "%s: overflow nonce=%0.8x lastnonce=%0.8x", ztex->repr, nonce, lastnonce[i]);
overflow = true; overflow = true;
} else } else

Loading…
Cancel
Save