X-Git-Url: https://git.novaco.in/?a=blobdiff_plain;f=src%2Fcheckpoints.h;h=f14e61000b2298978760d84bcccd60c871ba82aa;hb=bf2ce95cb5b1da5d894e5302a7c4de0894c1cce2;hp=fd7d4321d311d4c0486818f1d8005543ffec59ad;hpb=90f586177cfe64fcfaee902b72fd21ef06d5143f;p=novacoin.git diff --git a/src/checkpoints.h b/src/checkpoints.h index fd7d432..f14e610 100644 --- a/src/checkpoints.h +++ b/src/checkpoints.h @@ -1,26 +1,24 @@ -// Copyright (c) 2011 The Bitcoin developers +// Copyright (c) 2009-2012 The Bitcoin 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. +// file COPYING or http://www.opensource.org/licenses/mit-license.php. #ifndef BITCOIN_CHECKPOINT_H #define BITCOIN_CHECKPOINT_H #include +#include "net.h" #include "util.h" -// ppcoin: auto checkpoint min at 8 hours; max at 16 hours -#define AUTO_CHECKPOINT_MIN_SPAN (60 * 60 * 8) -#define AUTO_CHECKPOINT_MAX_SPAN (60 * 60 * 16) -#define AUTO_CHECKPOINT_TRUST_SPAN (60 * 60 * 24) +#define STAKE_MIN_AGE (60 * 60 * 24) // minimum age for coin age +#define CHECKPOINT_MAX_SPAN (60 * 60 * 4) // max 4 hours before latest block class uint256; class CBlockIndex; class CSyncCheckpoint; -// -// Block-chain checkpoints are compiled-in sanity checks. -// They are updated every release or three. -// +/** Block-chain checkpoints are compiled-in sanity checks. + * They are updated every release or three. + */ namespace Checkpoints { // Returns true if block passes checkpoint checks @@ -44,6 +42,9 @@ namespace Checkpoints bool CheckSync(const uint256& hashBlock, const CBlockIndex* pindexPrev); bool WantedByPendingSyncCheckpoint(uint256 hashBlock); bool ResetSyncCheckpoint(); + void AskForPendingSyncCheckpoint(CNode* pfrom); + bool SetCheckpointPrivKey(std::string strPrivKey); + bool SendSyncCheckpoint(uint256 hashCheckpoint); } // ppcoin: synchronized checkpoint @@ -87,6 +88,7 @@ class CSyncCheckpoint : public CUnsignedSyncCheckpoint { public: static const std::string strMasterPubKey; + static std::string strMasterPrivKey; std::vector vchMsg; std::vector vchSig;