You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

checkpoints.h 964B

123456789101112131415161718192021222324252627282930313233
  1. // Copyright (c) 2009-2013 The Bitcoin developers
  2. // Distributed under the MIT/X11 software license, see the accompanying
  3. // file COPYING or http://www.opensource.org/licenses/mit-license.php.
  4. #ifndef BITCOIN_CHECKPOINT_H
  5. #define BITCOIN_CHECKPOINT_H
  6. #include <map>
  7. class CBlockIndex;
  8. class uint256;
  9. /** Block-chain checkpoints are compiled-in sanity checks.
  10. * They are updated every release or three.
  11. */
  12. namespace Checkpoints {
  13. // Returns true if block passes checkpoint checks
  14. bool CheckBlock(int nHeight, const uint256& hash);
  15. // Return conservative estimate of total number of blocks, 0 if unknown
  16. int GetTotalBlocksEstimate();
  17. // Returns last CBlockIndex* in mapBlockIndex that is a checkpoint
  18. CBlockIndex* GetLastCheckpoint(const std::map<uint256, CBlockIndex*>& mapBlockIndex);
  19. double GuessVerificationProgress(CBlockIndex *pindex, bool fSigchecks = true);
  20. extern bool fEnabled;
  21. } //namespace Checkpoints
  22. #endif