Commit b1c273e71bdafa2539d86e152618c3138a9b567e

Con Kolivas 2012-04-27T12:54:29

Check for submitold flag on resubmit of shares, and give different message for stale shares on retry.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
diff --git a/cgminer.c b/cgminer.c
index b5de03f..63c645a 100644
--- a/cgminer.c
+++ b/cgminer.c
@@ -2102,8 +2102,8 @@ static void *submit_work_thread(void *userdata)
 
 		/* submit solution to bitcoin via JSON-RPC */
 		while (!submit_upstream_work(work)) {
-			if (!opt_submit_stale && stale_work(work, true)) {
-				applog(LOG_NOTICE, "Stale share detected, discarding");
+			if (!opt_submit_stale && stale_work(work, true) && !pool->submit_old) {
+				applog(LOG_NOTICE, "Stale share detected on submit retry, discarding");
 				total_stale++;
 				pool->stale_shares++;
 				break;