diff options
| author | Alan Westbrook <[email protected]> | 2014-01-29 00:17:29 -0800 |
|---|---|---|
| committer | Ross Nicoll <[email protected]> | 2014-04-09 21:47:08 +0100 |
| commit | 4a4d86a0e34bbb9321b0209825b3ecd707834228 (patch) | |
| tree | f0c3d94850bd81fa70630701750c4b5ff5941114 /src/rpcmining.cpp | |
| parent | Merge pull request #428 from leofidus/1.7-bitcoin-0.9.1 (diff) | |
| download | discoin-4a4d86a0e34bbb9321b0209825b3ecd707834228.tar.xz discoin-4a4d86a0e34bbb9321b0209825b3ecd707834228.zip | |
Change the lookup span modulo constant to something smaller
Why? Not really sure, but whatever.
Conflicts:
src/rpcmining.cpp
Diffstat (limited to 'src/rpcmining.cpp')
| -rw-r--r-- | src/rpcmining.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/rpcmining.cpp b/src/rpcmining.cpp index 67a0fb07b..01f205ce3 100644 --- a/src/rpcmining.cpp +++ b/src/rpcmining.cpp @@ -21,6 +21,8 @@ using namespace json_spirit; using namespace std; +static const int kLookupSpanMod = 240; + #ifdef ENABLE_WALLET // Key used by getwork miners. // Allocated in InitRPCMining, free'd in ShutdownRPCMining @@ -65,7 +67,7 @@ Value GetNetworkHashPS(int lookup, int height) { // If lookup is -1, then use blocks since last difficulty change. if (lookup <= 0) - lookup = pb->nHeight % 2016 + 1; + lookup = pb->nHeight % kLookupSpanMod + 1; // If lookup is larger than chain, then set it to chain length. if (lookup > pb->nHeight) |