Commit 8203cc67eb09a9802f44680c7be806dc3568b907

Con Kolivas 2011-07-16T10:28:59

Check the current block description hasn't been blanked pending the real new current block data.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
diff --git a/main.c b/main.c
index eda21aa..be11e10 100644
--- a/main.c
+++ b/main.c
@@ -875,10 +875,13 @@ static bool stale_work(struct work *work)
 	bool ret = false;
 	char *hexstr;
 
+	if (!strncmp(blank, current_block, 36))
+		return ret;
+
 	hexstr = bin2hex(work->data, 36);
 	if (unlikely(!hexstr)) {
 		applog(LOG_ERR, "submit_work_thread OOM");
-		return false;
+		return ret;
 	}
 
 	if (strncmp(hexstr, current_block, 36))