1
0
mirror of https://github.com/GOSTSec/poolserver synced 2025-01-14 08:47:53 +00:00

consider difficulty 1 as 0.01

This commit is contained in:
orignal 2017-09-20 16:17:05 -04:00
parent 1f12b4f30d
commit 2311801c78
2 changed files with 3 additions and 2 deletions

View File

@ -116,7 +116,7 @@ namespace Stratum
// Send difficulty update
JSON params;
params.Add(int64(_diff));
params.Add(double(_diff)/100); // diff 1 = 0.01
JSON msg;
msg["id"];

View File

@ -12,7 +12,8 @@ namespace Gostcoin
{
inline BigInt TargetToDiff(BigInt val)
{
static BigInt c("0x00000000ffff0000000000000000000000000000000000000000000000000000");
// we consider diff=1 as 0.01
static BigInt c("0x0000ffff00000000000000000000000000000000000000000000000000000000");
return (c / val);
}