Commit baddb82ad9a15889cdf2a3d728ca5b588b88c9a0

Con Kolivas 2011-07-22T07:50:20

Do one last check of the work before submitting it.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
diff --git a/main.c b/main.c
index cd11819..95974db 100644
--- a/main.c
+++ b/main.c
@@ -1817,6 +1817,9 @@ bool submit_nonce(struct thr_info *thr, struct work *work, uint32_t nonce)
 	work->data[64+12+1] = (nonce>>8) & 0xff;
 	work->data[64+12+2] = (nonce>>16) & 0xff;
 	work->data[64+12+3] = (nonce>>24) & 0xff;
+	/* Do one last check before attempting to submit the work */
+	if (!fulltest(work->data + 64, work->target))
+		return true;
 	return submit_work_sync(thr, work);
 }