aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@gmail.com>2016-02-09 11:07:53 +0100
committerWladimir J. van der Laan <laanwj@gmail.com>2016-02-09 11:08:40 +0100
commitb49a62379900762a39c2f00dcad764076426d954 (patch)
treef03bec8f3cbc8a511e9589e346c1f97fc7179b6f /src
parent3ffe4b241ed4c7733a1ac8312fd3766e0d312d48 (diff)
parent993d089e82fc045d7b0f23e1a5dc934cba0e3306 (diff)
Merge #7480: Changed getnetworkhps value to double to avoid overflow.
993d089 Changed getnetworkhps value to double to avoid overflow. (instagibbs)
Diffstat (limited to 'src')
-rw-r--r--src/rpc/mining.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/rpc/mining.cpp b/src/rpc/mining.cpp
index 996b7f9cbd..fec0987a4c 100644
--- a/src/rpc/mining.cpp
+++ b/src/rpc/mining.cpp
@@ -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)