// Copyright (c) 2009-2012 The Bitcoin developers
-// Copyright (c) 2011-2012 The PPCoin developers
+// Copyright (c) 2011-2013 The PPCoin developers
+// Copyright (c) 2013 NovaCoin Developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
static MapCheckpoints mapCheckpoints =
boost::assign::map_list_of
( 0, hashGenesisBlockOfficial )
- ; // ppcoin: no checkpoint yet; to be created in future releases
+ ;
bool CheckHardened(int nHeight, const uint256& hash)
{
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