1
0
mirror of https://github.com/GOSTSec/sgminer synced 2025-01-14 16:58:05 +00:00

Use BE when setting nonce in bitforce nonce range work.

This commit is contained in:
Con Kolivas 2012-07-05 00:22:42 +10:00
parent d6a6d70f4b
commit ba5c1fc07d

View File

@ -292,9 +292,10 @@ re_send:
uint32_t *nonce; uint32_t *nonce;
nonce = (uint32_t *)(ob + 8 + 32 + 12); nonce = (uint32_t *)(ob + 8 + 32 + 12);
*nonce = work->blk.nonce; *nonce = htobe32(work->blk.nonce);
nonce = (uint32_t *)(ob + 8 + 32 + 12 + 4); 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, ">>>>>>>>"); sprintf((char *)ob + 8 + 32 + 12 + 8, ">>>>>>>>");
BFwrite(fdDev, ob, 68); BFwrite(fdDev, ob, 68);
} }