static const int64 nTargetTimespan = 7 * 24 * 60 * 60; // one week
static const int64 nTargetSpacingStake = 10 * 60; // ten minutes
static const int64 nTargetSpacingWorkMax = 2 * 60 * 60; // two hours
-static const int64 nMaxClockDrift = 2 * 60 * 60; // two hours
//
// minimum amount of work that could possibly be required nTime after
static const uint256 hashGenesisBlockOfficial("0x0000000032fe677166d54963b62a4677d8957e87c508eaa4fd7eb1c880cd27e3");
static const uint256 hashGenesisBlockTestNet("0x00000001f757bb737f6596503e17cd17b0658ce630cc727c0cca81aec47c9f06");
+static const int64 nMaxClockDrift = 2 * 60 * 60; // two hours
+
extern CScript COINBASE_FLAGS;
CBlock block;
if (!block.ReadFromDisk(txindex.pos.nFile, txindex.pos.nBlockPos, false))
continue;
- if (block.GetBlockTime() + nStakeMinAge > txNew.nTime - (60 * 60 * 2))
+ if (block.GetBlockTime() + nStakeMinAge > txNew.nTime - nMaxClockDrift)
continue; // only count coins meeting min age requirement
int64 nValueIn = pcoin.first->vout[pcoin.second].nValue;
for (int n=0; n<min(nSearchInterval,(int64)5) && !fKernelFound && !fShutdown; n++)
{
// Randomly pick a timestamp from protocol allowed range
- txNew.nTime = GetAdjustedTime() - GetRandInt(60 * 60 * 2 - 60);
+ txNew.nTime = GetAdjustedTime() - GetRandInt(nMaxClockDrift - 60);
// Calculate hash
CDataStream ss(SER_GETHASH, 0);
ss << nBits << block.nTime << (txindex.pos.nTxPos - txindex.pos.nBlockPos) << pcoin.first->nTime << pcoin.second << txNew.nTime;