Change the lookup span modulo constant to something smaller
Why? Not really sure, but whatever. Conflicts: src/rpcmining.cpp
This commit is contained in:
parent
a7ba819a5c
commit
4a4d86a0e3
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue