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 1004B

1234567891011121314151617181920212223242526272829303132
  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. bool fPowNoRetargeting;
  23. int64_t nPowTargetSpacing;
  24. int64_t nPowTargetTimespan;
  25. int64_t DifficultyAdjustmentInterval() const { return nPowTargetTimespan / nPowTargetSpacing; }
  26. };
  27. } // namespace Consensus
  28. #endif // BITCOIN_CONSENSUS_PARAMS_H