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 1.0KB

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_CONSENSUS_PARAMS_H
  6. #define BITCOIN_CONSENSUS_CONSENSUS_PARAMS_H
  7. #include "arith_uint256.h"
  8. #include "uint256.h"
  9. namespace Consensus {
  10. /**
  11. * Parameters that influence chain consensus.
  12. */
  13. struct Params {
  14. uint256 hashGenesisBlock;
  15. int nSubsidyHalvingInterval;
  16. /** Used to check majorities for block version upgrade */
  17. int nMajorityEnforceBlockUpgrade;
  18. int nMajorityRejectBlockOutdated;
  19. int nMajorityWindow;
  20. /** Proof of work parameters */
  21. arith_uint256 powLimit;
  22. bool fPowAllowMinDifficultyBlocks;
  23. int64_t nPowTargetSpacing;
  24. int64_t nPowTargetTimespan;
  25. int64_t DifficultyAdjustmentInterval() const { return nPowTargetTimespan / nPowTargetSpacing; }
  26. };
  27. } // namespace Consensus
  28. #endif // BITCOIN_CONSENSUS_CONSENSUS_PARAMS_H