Browse Source

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

Con Kolivas 14 years ago
parent
commit
8203cc67eb
1 changed files with 4 additions and 1 deletions
  1. 4 1
      main.c

+ 4 - 1
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))