Commit 74b96d4b3f6b6d5d6fea43bb0e619cec85e1f5cd

Con Kolivas 2012-07-06T15:05:38

Use a much shorter initial sleep time to account for faster devices and nonce range working, and increase it if nonce range fails to work.

diff --git a/driver-bitforce.c b/driver-bitforce.c
index 2156948..c1f10b5 100644
--- a/driver-bitforce.c
+++ b/driver-bitforce.c
@@ -20,7 +20,7 @@
 #include "fpgautils.h"
 #include "miner.h"
 
-#define BITFORCE_SLEEP_MS 3000
+#define BITFORCE_SLEEP_MS 666
 #define BITFORCE_TIMEOUT_MS 7000
 #define BITFORCE_LONG_TIMEOUT_MS 15000
 #define BITFORCE_CHECK_INTERVAL_MS 10
@@ -278,6 +278,7 @@ re_send:
 		if (bitforce->nonce_range) {
 			applog(LOG_DEBUG, "BFL%i: Disabling nonce range support", bitforce->device_id);
 			bitforce->nonce_range = false;
+			bitforce->sleep_ms *= 5;
 			goto re_send;
 		}
 		applog(LOG_ERR, "BFL%i: Error: Send work reports: %s", bitforce->device_id, pdevbuf);
@@ -404,6 +405,7 @@ static uint64_t bitforce_get_result(struct thr_info *thr, struct work *work)
 				applog(LOG_INFO, "BFL%i: Disabling broken nonce range support", bitforce->device_id);
 				bitforce->nonce_range = false;
 				work->blk.nonce = 0xffffffff;
+				bitforce->sleep_ms *= 5;
 		}
 			
 		submit_nonce(thr, work, nonce);