X-Git-Url: https://git.novaco.in/?a=blobdiff_plain;f=src%2Fcheckpoints.h;h=f9037a2a5409242d649265d2c4f1971bfb620baa;hb=d9c2b146de005884bdae8987b35fe74e507f840a;hp=78ccce9d1da62442961241c6652e19c60a409410;hpb=e0fa1f887a2a94fd8beb4f62fe997dc3532c266c;p=novacoin.git diff --git a/src/checkpoints.h b/src/checkpoints.h index 78ccce9..f9037a2 100644 --- a/src/checkpoints.h +++ b/src/checkpoints.h @@ -1,5 +1,5 @@ // Copyright (c) 2011 The Bitcoin developers -// Copyright (c) 2011 The PPCoin developers +// Copyright (c) 2011-2012 The PPCoin developers // Distributed under the MIT/X11 software license, see the accompanying // file license.txt or http://www.opensource.org/licenses/mit-license.php. #ifndef BITCOIN_CHECKPOINT_H @@ -8,9 +8,10 @@ #include #include "util.h" -// ppcoin: auto checkpoint min at 1 day; max at 1 week -#define AUTO_CHECKPOINT_MIN_SPAN (60 * 60 * 24) -#define AUTO_CHECKPOINT_MAX_SPAN (60 * 60 * 24 * 7) +// ppcoin: auto checkpoint min at 1 day; max at 5 days +#define AUTO_CHECKPOINT_MIN_SPAN (60 * 60 * 24) +#define AUTO_CHECKPOINT_MAX_SPAN (60 * 60 * 24 * 5) +#define AUTO_CHECKPOINT_TRUST_SPAN (60 * 60 * 24 * 7) class uint256; class CBlockIndex; @@ -22,13 +23,16 @@ class CBlockIndex; namespace Checkpoints { extern int nAutoCheckpoint; + extern int nBranchPoint; // Returns true if block passes checkpoint checks bool CheckHardened(int nHeight, const uint256& hash); bool CheckAuto(const CBlockIndex *pindex); int GetNextChainCheckpoint(const CBlockIndex *pindex); + int GetNextAutoCheckpoint(int nCheckpoint); void AdvanceAutoCheckpoint(int nCheckpoint); + bool ResetAutoCheckpoint(int nCheckpoint); // Return conservative estimate of total number of blocks, 0 if unknown int GetTotalBlocksEstimate();