Browse Source

Merge #7480: Changed getnetworkhps value to double to avoid overflow.

993d089 Changed getnetworkhps value to double to avoid overflow. (instagibbs)
0.13
Wladimir J. van der Laan 9 years ago
parent
commit
b49a623799
No known key found for this signature in database
GPG Key ID: 74810B012346C9A6
  1. 2
      src/rpc/mining.cpp

2
src/rpc/mining.cpp

@ -68,7 +68,7 @@ UniValue GetNetworkHashPS(int lookup, int height) { @@ -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)

Loading…
Cancel
Save