PPCoin: Check time as well for checkpoint-too-old safe mode
[novacoin.git] / src / checkpoints.cpp
index 7174d10..0f6e441 100644 (file)
@@ -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());
     }
 }