Browse Source

consider difficulty 1 as 0.01

master
orignal 7 years ago
parent
commit
2311801c78
  1. 2
      src/server/poolserver/Stratum/Client.h
  2. 3
      src/server/shared/Gostcoin/Gostcoin.h

2
src/server/poolserver/Stratum/Client.h

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

3
src/server/shared/Gostcoin/Gostcoin.h

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

Loading…
Cancel
Save