mirror of
https://github.com/dashpay/dash.git
synced 2024-12-27 04:52:59 +01:00
Changed getnetworkhps value to double to avoid overflow.
This commit is contained in:
parent
326f010332
commit
993d089e82
@ -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