mirror of
https://github.com/dogecoin/dogecoin.git
synced 2026-03-02 00:56:02 +00:00
Clarified label on constant containing difficulty change interval.
This commit is contained in:
parent
99786bfe02
commit
564ed4faee
@ -12,7 +12,8 @@
|
||||
using namespace json_spirit;
|
||||
using namespace std;
|
||||
|
||||
static const int kLookupSpanMod = 240;
|
||||
// Number of blocks between difficulty changes
|
||||
static const int kDifficultyChangeInterval = 240;
|
||||
|
||||
// Return average network hashes per second based on the last 'lookup' blocks,
|
||||
// or from the last difficulty change if 'lookup' is nonpositive.
|
||||
@ -28,7 +29,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)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user