Commit 61360952f542115d085c362e8a68d86ceda41e6e

Con Kolivas 2012-09-29T17:44:19

Fix endianness of nonce submitted for stratum.

1
2
3
4
5
6
7
8
9
10
11
12
13
diff --git a/cgminer.c b/cgminer.c
index 8d62c96..529f9fb 100644
--- a/cgminer.c
+++ b/cgminer.c
@@ -2738,7 +2738,7 @@ static void *submit_work_thread(void *userdata)
 		mutex_unlock(&sshare_lock);
 
 		sprintf(s, "{\"params\": [\"%s\", \"%s\", \"%s\", \"%s\", \"%08lx\"], \"id\": %d, \"method\": \"mining.submit\"}",
-			pool->rpc_user, work->job_id, work->nonce2, work->ntime, (unsigned long)work->blk.nonce, sshare->id);
+			pool->rpc_user, work->job_id, work->nonce2, work->ntime, (unsigned long)htobe32(work->blk.nonce), sshare->id);
 
 		sock_send(pool->sock, s, strlen(s));