Change the lookup span modulo constant to something smaller

Why? Not really sure, but whatever.

Conflicts:

	src/rpcmining.cpp
This commit is contained in:
Alan Westbrook 2014-01-29 00:17:29 -08:00 committed by Ross Nicoll
parent a7ba819a5c
commit 4a4d86a0e3
No known key found for this signature in database
GPG key ID: 9142E5F7E533CE3B

View file

@ -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)