return (nBestHeight >= pindexSync->nHeight + nCoinbaseMaturity ||
pindexSync->GetBlockTime() + nStakeMinAge < GetAdjustedTime());
}
-
- // Is the sync-checkpoint too old?
- bool IsSyncCheckpointTooOld(unsigned int nSeconds)
- {
- LOCK(cs_hashSyncCheckpoint);
- // sync-checkpoint should always be accepted block
- assert(mapBlockIndex.count(hashSyncCheckpoint));
- const CBlockIndex* pindexSync = mapBlockIndex[hashSyncCheckpoint];
- return (pindexSync->GetBlockTime() + nSeconds < GetAdjustedTime());
- }
}
// ppcoin: sync-checkpoint master key
bool SetCheckpointPrivKey(std::string strPrivKey);
bool SendSyncCheckpoint(uint256 hashCheckpoint);
bool IsMatureSyncCheckpoint();
- bool IsSyncCheckpointTooOld(unsigned int nSeconds);
}
// ppcoin: synchronized checkpoint
strStatusBar = strMiscWarning;
}
- // * Should not enter safe mode for longer invalid chain
- // * If sync-checkpoint is too old do not enter safe mode
- // * Display warning only in the STRICT mode
- if (CheckpointsMode == Checkpoints::STRICT && Checkpoints::IsSyncCheckpointTooOld(60 * 60 * 24 * 10) &&
- !fTestNet && !IsInitialBlockDownload())
- {
- nPriority = 100;
- strStatusBar = _("WARNING: Checkpoint is too old. Wait for block chain to download, or notify developers.");
- }
-
// if detected unmet upgrade requirement enter safe mode
// Note: Modifier upgrade requires blockchain redownload if past protocol switch
if (IsFixedModifierInterval(nModifierUpgradeTime + 60*60*24)) // 1 day margin