Commit 54ab28fd6e4f7b2822cdf728871af23e8a48cd3c

Con Kolivas 2012-09-29T00:38:09

Provide rudimentary support for stratum clean work command in the stratum thread.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
diff --git a/cgminer.c b/cgminer.c
index 9473121..e880c48 100644
--- a/cgminer.c
+++ b/cgminer.c
@@ -3993,6 +3993,11 @@ static void *stratum_thread(void *userdata)
 		if (!parse_stratum(pool, s)) /* Create message queues here */
 			applog(LOG_INFO, "Unknown stratum msg: %s", s);
 		free(s);
+		if (unlikely(pool->swork.clean)) {
+			pool->swork.clean = false;
+			applog(LOG_NOTICE, "Stratum requested work restart for block change");
+			restart_threads();
+		}
 
 		if (unlikely(pool->removed)) {
 			CLOSESOCKET(pool->sock);