mirror of
https://github.com/GOSTSec/sgminer
synced 2025-01-09 06:18:06 +00:00
Correct set_blockdiff for big endian machines.
This commit is contained in:
parent
043e9d9bab
commit
463e366c8d
@ -4095,7 +4095,7 @@ static void set_blockdiff(const struct work *work)
|
||||
{
|
||||
uint8_t pow = work->data[72];
|
||||
int powdiff = (8 * (0x1d - 3)) - (8 * (pow - 3));
|
||||
uint32_t diff32 = swab32(*((uint32_t *)(work->data + 72))) & 0x00FFFFFF;
|
||||
uint32_t diff32 = be32toh(*((uint32_t *)(work->data + 72))) & 0x00FFFFFF;
|
||||
double numerator = 0xFFFFULL << powdiff;
|
||||
double ddiff = numerator / (double)diff32;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user