Commit 32edcc5e80306ee52592893c4a17ccc496528ad2

Con Kolivas 2014-03-14T10:35:51

Decrease the time we wait for unsetting a core on the cta bitmap to correspond with the lower max diff of 32.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
diff --git a/driver-cointerra.c b/driver-cointerra.c
index db5d90a..92467de 100644
--- a/driver-cointerra.c
+++ b/driver-cointerra.c
@@ -966,11 +966,13 @@ static int64_t cta_scanwork(struct thr_info *thr)
 		 * return a work done message for some work items. */
 		age_queued_work(cointerra, 300.0);
 
-		/* Use this opportunity to unset the bits in any pipes that
-		 * have not returned a valid nonce for over 2 hours. */
+		/* Each core should be 1.7MH so at max diff of 32 should
+		 * average a share every ~80 seconds.Use this opportunity to
+		 * unset the bits in any pipes that have not returned a valid
+		 * nonce for over 30 full nonce ranges or 2400s. */
 		now_t = time(NULL);
 		for (i = 0; i < 1024; i++) {
-			if (unlikely(now_t > info->last_pipe_nonce[i] + 7200)) {
+			if (unlikely(now_t > info->last_pipe_nonce[i] + 2400)) {
 				int bitchar = i / 8, bitbit = i % 8;
 
 				info->pipe_bitmap[bitchar] &= ~(0x80 >> bitbit);