1
0
mirror of https://github.com/GOSTSec/sgminer synced 2025-01-23 04:54:26 +00:00

Bugfix: Calculate Icarus timeout-exhausted nonce count correctly

We're only waiting 8 seconds for results from Icarus, but actually exhausing the nonce space requires 11.3
This commit is contained in:
Luke Dashjr 2012-04-21 10:49:17 -04:00
parent 9b5615d5f3
commit 355a87e10b

View File

@ -290,8 +290,11 @@ static uint64_t icarus_scanhash(struct thr_info *thr, struct work *work,
memcpy((char *)&nonce, nonce_bin, sizeof(nonce_bin));
if (nonce == 0 && ret)
return 0xffffffff;
if (nonce == 0 && ret) {
t = time(NULL) - t;
// Approximately how much of the nonce Icarus scans in 1 second...
return 0x16a7a561 * t;
}
#ifndef __BIG_ENDIAN__
nonce = swab32(nonce);