Changeset View
Changeset View
Standalone View
Standalone View
src/consensus/params.h
// Copyright (c) 2009-2010 Satoshi Nakamoto | // Copyright (c) 2009-2010 Satoshi Nakamoto | ||||
// Copyright (c) 2009-2016 The Bitcoin Core developers | // Copyright (c) 2009-2016 The Bitcoin Core developers | ||||
// Distributed under the MIT software license, see the accompanying | // Distributed under the MIT software license, see the accompanying | ||||
// file COPYING or http://www.opensource.org/licenses/mit-license.php. | // file COPYING or http://www.opensource.org/licenses/mit-license.php. | ||||
#ifndef BITCOIN_CONSENSUS_PARAMS_H | #ifndef BITCOIN_CONSENSUS_PARAMS_H | ||||
#define BITCOIN_CONSENSUS_PARAMS_H | #define BITCOIN_CONSENSUS_PARAMS_H | ||||
#include <uint256.h> | #include <primitives/blockhash.h> | ||||
#include <map> | |||||
#include <string> | |||||
namespace Consensus { | namespace Consensus { | ||||
/** | /** | ||||
* Parameters that influence chain consensus. | * Parameters that influence chain consensus. | ||||
*/ | */ | ||||
struct Params { | struct Params { | ||||
uint256 hashGenesisBlock; | BlockHash hashGenesisBlock; | ||||
int nSubsidyHalvingInterval; | int nSubsidyHalvingInterval; | ||||
/** Block height at which BIP16 becomes active */ | /** Block height at which BIP16 becomes active */ | ||||
int BIP16Height; | int BIP16Height; | ||||
/** Block height and hash at which BIP34 becomes active */ | /** Block height and hash at which BIP34 becomes active */ | ||||
int BIP34Height; | int BIP34Height; | ||||
uint256 BIP34Hash; | BlockHash BIP34Hash; | ||||
/** Block height at which BIP65 becomes active */ | /** Block height at which BIP65 becomes active */ | ||||
int BIP65Height; | int BIP65Height; | ||||
/** Block height at which BIP66 becomes active */ | /** Block height at which BIP66 becomes active */ | ||||
int BIP66Height; | int BIP66Height; | ||||
/** Block height at which CSV (BIP68, BIP112 and BIP113) becomes active */ | /** Block height at which CSV (BIP68, BIP112 and BIP113) becomes active */ | ||||
int CSVHeight; | int CSVHeight; | ||||
/** Block height at which UAHF kicks in */ | /** Block height at which UAHF kicks in */ | ||||
int uahfHeight; | int uahfHeight; | ||||
Show All 10 Lines | struct Params { | ||||
bool fPowAllowMinDifficultyBlocks; | bool fPowAllowMinDifficultyBlocks; | ||||
bool fPowNoRetargeting; | bool fPowNoRetargeting; | ||||
int64_t nPowTargetSpacing; | int64_t nPowTargetSpacing; | ||||
int64_t nPowTargetTimespan; | int64_t nPowTargetTimespan; | ||||
int64_t DifficultyAdjustmentInterval() const { | int64_t DifficultyAdjustmentInterval() const { | ||||
return nPowTargetTimespan / nPowTargetSpacing; | return nPowTargetTimespan / nPowTargetSpacing; | ||||
} | } | ||||
uint256 nMinimumChainWork; | uint256 nMinimumChainWork; | ||||
uint256 defaultAssumeValid; | BlockHash defaultAssumeValid; | ||||
}; | }; | ||||
} // namespace Consensus | } // namespace Consensus | ||||
#endif // BITCOIN_CONSENSUS_PARAMS_H | #endif // BITCOIN_CONSENSUS_PARAMS_H |