Remove unused variables and/or function calls
[bitcoinplatinum.git] / src / consensus / params.h
blob6240e82857eb99c6fe2f371a058211b4a77469ff
1 // Copyright (c) 2009-2010 Satoshi Nakamoto
2 // Copyright (c) 2009-2016 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.
6 #ifndef BITCOIN_CONSENSUS_PARAMS_H
7 #define BITCOIN_CONSENSUS_PARAMS_H
9 #include "uint256.h"
10 #include <map>
11 #include <string>
13 namespace Consensus {
15 enum DeploymentPos
17 DEPLOYMENT_TESTDUMMY,
18 DEPLOYMENT_CSV, // Deployment of BIP68, BIP112, and BIP113.
19 DEPLOYMENT_SEGWIT, // Deployment of BIP141, BIP143, and BIP147.
20 // NOTE: Also add new deployments to VersionBitsDeploymentInfo in versionbits.cpp
21 MAX_VERSION_BITS_DEPLOYMENTS
24 /**
25 * Struct for each individual consensus rule change using BIP9.
27 struct BIP9Deployment {
28 /** Bit position to select the particular bit in nVersion. */
29 int bit;
30 /** Start MedianTime for version bits miner confirmation. Can be a date in the past */
31 int64_t nStartTime;
32 /** Timeout/expiry MedianTime for the deployment attempt. */
33 int64_t nTimeout;
36 /**
37 * Parameters that influence chain consensus.
39 struct Params {
40 uint256 hashGenesisBlock;
41 int nSubsidyHalvingInterval;
42 /** Block height and hash at which BIP34 becomes active */
43 int BIP34Height;
44 uint256 BIP34Hash;
45 /** Block height at which BIP65 becomes active */
46 int BIP65Height;
47 /** Block height at which BIP66 becomes active */
48 int BIP66Height;
49 /**
50 * Minimum blocks including miner confirmation of the total of 2016 blocks in a retargeting period,
51 * (nPowTargetTimespan / nPowTargetSpacing) which is also used for BIP9 deployments.
52 * Examples: 1916 for 95%, 1512 for testchains.
54 uint32_t nRuleChangeActivationThreshold;
55 uint32_t nMinerConfirmationWindow;
56 BIP9Deployment vDeployments[MAX_VERSION_BITS_DEPLOYMENTS];
57 /** Proof of work parameters */
58 uint256 powLimit;
59 bool fPowAllowMinDifficultyBlocks;
60 bool fPowNoRetargeting;
61 int64_t nPowTargetSpacing;
62 int64_t nPowTargetTimespan;
63 int64_t DifficultyAdjustmentInterval() const { return nPowTargetTimespan / nPowTargetSpacing; }
64 uint256 nMinimumChainWork;
65 uint256 defaultAssumeValid;
67 } // namespace Consensus
69 #endif // BITCOIN_CONSENSUS_PARAMS_H