mirror of
https://github.com/GOSTSec/sgminer
synced 2025-01-23 04:54:26 +00:00
Correct target calculation in gen_stratum_work.
This commit is contained in:
parent
925d01922b
commit
a8a8ed6207
@ -4552,7 +4552,7 @@ static void gen_stratum_work(struct pool *pool, struct work *work)
|
|||||||
quit(1, "Failed to convert hash1 in gen_stratum_work");
|
quit(1, "Failed to convert hash1 in gen_stratum_work");
|
||||||
|
|
||||||
/* Generate target as hex where 0x00000000FFFFFFFF is diff 1 */
|
/* Generate target as hex where 0x00000000FFFFFFFF is diff 1 */
|
||||||
diff64 = 0x00000000FFFFFFFFULL * diff;
|
diff64 = (1Ull << (31 + diff)) - 1;
|
||||||
diff64 = ~htobe64(diff64);
|
diff64 = ~htobe64(diff64);
|
||||||
sprintf(target, "ffffffffffffffffffffffffffffffffffffffffffffffff");
|
sprintf(target, "ffffffffffffffffffffffffffffffffffffffffffffffff");
|
||||||
buf = bin2hex((const unsigned char *)&diff64, 8);
|
buf = bin2hex((const unsigned char *)&diff64, 8);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user