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