From: Sunny King Date: Tue, 14 Aug 2012 18:59:17 +0000 (+0100) Subject: PPCoin: Check time as well for checkpoint-too-old safe mode X-Git-Tag: v0.4.0-unstable~98 X-Git-Url: https://git.novaco.in/?p=novacoin.git;a=commitdiff_plain;h=2387c21c4d484d156323ff61b90a660f2532af08 PPCoin: Check time as well for checkpoint-too-old safe mode --- diff --git a/src/checkpoints.cpp b/src/checkpoints.cpp index 7174d10..0f6e441 100644 --- a/src/checkpoints.cpp +++ b/src/checkpoints.cpp @@ -348,7 +348,8 @@ namespace Checkpoints // sync-checkpoint should always be accepted block assert(mapBlockIndex.count(hashSyncCheckpoint)); const CBlockIndex* pindexSync = mapBlockIndex[hashSyncCheckpoint]; - return (nBestHeight >= pindexSync->nHeight + COINBASE_MATURITY); + return (nBestHeight >= pindexSync->nHeight + COINBASE_MATURITY || + pindexSync->GetBlockTime() + STAKE_MIN_AGE < GetAdjustedTime()); } }