Commit ba5c1fc07d24e27dd7d60245714c297bedaa557a

Con Kolivas 2012-07-05T00:22:42

Use BE when setting nonce in bitforce nonce range work.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
diff --git a/driver-bitforce.c b/driver-bitforce.c
index 68fe265..154a2e6 100644
--- a/driver-bitforce.c
+++ b/driver-bitforce.c
@@ -292,9 +292,10 @@ re_send:
 		uint32_t *nonce;
 
 		nonce = (uint32_t *)(ob + 8 + 32 + 12);
-		*nonce = work->blk.nonce;
+		*nonce = htobe32(work->blk.nonce);
 		nonce = (uint32_t *)(ob + 8 + 32 + 12 + 4);
-		bitforce->end_nonce = *nonce = work->blk.nonce + 0x40000000;
+		bitforce->end_nonce = work->blk.nonce + 0x40000000;
+		*nonce = htobe32(bitforce->end_nonce);
 		sprintf((char *)ob + 8 + 32 + 12 + 8, ">>>>>>>>");
 		BFwrite(fdDev, ob, 68);
 	}