From: CryptoManiac Date: Sat, 14 Jun 2014 19:26:54 +0000 (+0400) Subject: Don't notify old sync checkpoints anymore X-Git-Tag: v0.4.4.7-nvc-bugfix5~1^2~14 X-Git-Url: https://git.novaco.in/?p=novacoin.git;a=commitdiff_plain;h=2fc1013aa0db74bfd1bb4a9249a2edf4c8f8ed5c Don't notify old sync checkpoints anymore --- diff --git a/src/checkpoints.cpp b/src/checkpoints.cpp index f261687..a292bea 100644 --- a/src/checkpoints.cpp +++ b/src/checkpoints.cpp @@ -351,16 +351,6 @@ namespace Checkpoints 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 diff --git a/src/checkpoints.h b/src/checkpoints.h index d55eccb..bb7a78d 100644 --- a/src/checkpoints.h +++ b/src/checkpoints.h @@ -64,7 +64,6 @@ namespace Checkpoints bool SetCheckpointPrivKey(std::string strPrivKey); bool SendSyncCheckpoint(uint256 hashCheckpoint); bool IsMatureSyncCheckpoint(); - bool IsSyncCheckpointTooOld(unsigned int nSeconds); } // ppcoin: synchronized checkpoint diff --git a/src/main.cpp b/src/main.cpp index f27ebcd..8407d03 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -3307,16 +3307,6 @@ string GetWarnings(string strFor) 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