Changed getnetworkhps value to double to avoid overflow.

Github-Pull; #7480
Rebased-From: 993d089e82fc045d7b0f23e1a5dc934cba0e3306
This commit is contained in:
instagibbs 2016-02-08 10:49:27 -05:00 committed by Wladimir J. van der Laan
parent 947c4ff724
commit c3faf78c0e
No known key found for this signature in database
GPG Key ID: 74810B012346C9A6

View File

@ -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)