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.

params.h 976B

12345678910111213141516171819202122232425262728293031
  1. // Copyright (c) 2009-2010 Satoshi Nakamoto
  2. // Copyright (c) 2009-2014 The Bitcoin Core developers
  3. // Distributed under the MIT software license, see the accompanying
  4. // file COPYING or http://www.opensource.org/licenses/mit-license.php.
  5. #ifndef BITCOIN_CONSENSUS_PARAMS_H
  6. #define BITCOIN_CONSENSUS_PARAMS_H
  7. #include "uint256.h"
  8. namespace Consensus {
  9. /**
  10. * Parameters that influence chain consensus.
  11. */
  12. struct Params {
  13. uint256 hashGenesisBlock;
  14. int nSubsidyHalvingInterval;
  15. /** Used to check majorities for block version upgrade */
  16. int nMajorityEnforceBlockUpgrade;
  17. int nMajorityRejectBlockOutdated;
  18. int nMajorityWindow;
  19. /** Proof of work parameters */
  20. uint256 powLimit;
  21. bool fPowAllowMinDifficultyBlocks;
  22. int64_t nPowTargetSpacing;
  23. int64_t nPowTargetTimespan;
  24. int64_t DifficultyAdjustmentInterval() const { return nPowTargetTimespan / nPowTargetSpacing; }
  25. };
  26. } // namespace Consensus
  27. #endif // BITCOIN_CONSENSUS_PARAMS_H