From 2387c21c4d484d156323ff61b90a660f2532af08 Mon Sep 17 00:00:00 2001 From: Sunny King Date: Tue, 14 Aug 2012 19:59:17 +0100 Subject: [PATCH] PPCoin: Check time as well for checkpoint-too-old safe mode --- src/checkpoints.cpp | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) 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()); } } -- 1.7.1