From c3faf78c0e96a8c64a5ff8c37ef6fc4cfb35d125 Mon Sep 17 00:00:00 2001 From: instagibbs Date: Mon, 8 Feb 2016 10:49:27 -0500 Subject: [PATCH] Changed getnetworkhps value to double to avoid overflow. Github-Pull; #7480 Rebased-From: 993d089e82fc045d7b0f23e1a5dc934cba0e3306 --- src/rpcmining.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/rpcmining.cpp b/src/rpcmining.cpp index 958c817d6..1048344e0 100644 --- a/src/rpcmining.cpp +++ b/src/rpcmining.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)