Commit 355a87e10b289f11f07423ae31d82e6ddac35295

Luke Dashjr 2012-04-21T10:49:17

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

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
diff --git a/driver-icarus.c b/driver-icarus.c
index 4aab784..a5e3955 100644
--- a/driver-icarus.c
+++ b/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);