Commit d16d4928f7a5d4365b5d1495f99434f9a56dd1c3

Con Kolivas 2013-02-22T21:41:47

Fix --benchmark generating valid work for cgminer.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
diff --git a/cgminer.c b/cgminer.c
index 1ad5a1c..e35814f 100644
--- a/cgminer.c
+++ b/cgminer.c
@@ -3031,6 +3031,9 @@ static bool stale_work(struct work *work, bool share)
 	struct pool *pool;
 	int getwork_delay;
 
+	if (opt_benchmark)
+		return false;
+
 	if (work->work_block != work_block) {
 		applog(LOG_DEBUG, "Work stale due to block mismatch");
 		return true;