aboutsummaryrefslogtreecommitdiff
path: root/src/rpcmining.cpp
diff options
context:
space:
mode:
authorRoss Nicoll <[email protected]>2014-03-15 12:54:08 +0000
committerRoss Nicoll <[email protected]>2014-04-09 21:47:44 +0100
commit9a02b7a365919eeb5a200b0cb3d224de907786fa (patch)
tree605982f594903e6f537528e485579614b3713ad3 /src/rpcmining.cpp
parentChange the lookup span modulo constant to something smaller (diff)
downloaddiscoin-9a02b7a365919eeb5a200b0cb3d224de907786fa.tar.xz
discoin-9a02b7a365919eeb5a200b0cb3d224de907786fa.zip
Clarified label on constant containing difficulty change interval.
Diffstat (limited to 'src/rpcmining.cpp')
-rw-r--r--src/rpcmining.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/rpcmining.cpp b/src/rpcmining.cpp
index 01f205ce3..114b33ecb 100644
--- a/src/rpcmining.cpp
+++ b/src/rpcmining.cpp
@@ -21,7 +21,8 @@
using namespace json_spirit;
using namespace std;
-static const int kLookupSpanMod = 240;
+// Number of blocks between difficulty changes
+static const int kDifficultyChangeInterval = 240;
#ifdef ENABLE_WALLET
// Key used by getwork miners.
@@ -67,7 +68,7 @@ Value GetNetworkHashPS(int lookup, int height) {
// If lookup is -1, then use blocks since last difficulty change.
if (lookup <= 0)
- lookup = pb->nHeight % kLookupSpanMod + 1;
+ lookup = pb->nHeight % kDifficultyChangeInterval + 1;
// If lookup is larger than chain, then set it to chain length.
if (lookup > pb->nHeight)