Changed getnetworkhps value to double to avoid overflow.
Github-Pull; #7480 Rebased-From: 993d089e82fc045d7b0f23e1a5dc934cba0e3306
This commit is contained in:
parent
947c4ff724
commit
c3faf78c0e
@ -68,7 +68,7 @@ UniValue GetNetworkHashPS(int lookup, int height) {
|
|||||||
arith_uint256 workDiff = pb->nChainWork - pb0->nChainWork;
|
arith_uint256 workDiff = pb->nChainWork - pb0->nChainWork;
|
||||||
int64_t timeDiff = maxTime - minTime;
|
int64_t timeDiff = maxTime - minTime;
|
||||||
|
|
||||||
return (int64_t)(workDiff.getdouble() / timeDiff);
|
return workDiff.getdouble() / timeDiff;
|
||||||
}
|
}
|
||||||
|
|
||||||
UniValue getnetworkhashps(const UniValue& params, bool fHelp)
|
UniValue getnetworkhashps(const UniValue& params, bool fHelp)
|
||||||
|
Loading…
Reference in New Issue
Block a user