mirror of
https://github.com/GOSTSec/poolserver
synced 2025-01-15 01:00:10 +00:00
consider difficulty 1 as 0.01
This commit is contained in:
parent
1f12b4f30d
commit
2311801c78
@ -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"];
|
||||||
|
@ -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…
x
Reference in New Issue
Block a user