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