Browse Source

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
Luke Dashjr 14 years ago
parent
commit
355a87e10b
1 changed files with 5 additions and 2 deletions
  1. 5 2
      driver-icarus.c

+ 5 - 2
driver-icarus.c

@@ -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);