Changeset View
Changeset View
Standalone View
Standalone View
src/validation.h
Show First 20 Lines • Show All 114 Lines • ▼ Show 20 Lines | |||||
extern GlobalMutex g_best_block_mutex; | extern GlobalMutex g_best_block_mutex; | ||||
extern std::condition_variable g_best_block_cv; | extern std::condition_variable g_best_block_cv; | ||||
/** Used to notify getblocktemplate RPC of new tips. */ | /** Used to notify getblocktemplate RPC of new tips. */ | ||||
extern uint256 g_best_block; | extern uint256 g_best_block; | ||||
extern bool fCheckBlockIndex; | extern bool fCheckBlockIndex; | ||||
extern bool fCheckpointsEnabled; | extern bool fCheckpointsEnabled; | ||||
/** | |||||
* Minimum work we will assume exists on some valid chain. | |||||
*/ | |||||
extern arith_uint256 nMinimumChainWork; | |||||
/** Documentation for argument 'checklevel'. */ | /** Documentation for argument 'checklevel'. */ | ||||
extern const std::vector<std::string> CHECKLEVEL_DOC; | extern const std::vector<std::string> CHECKLEVEL_DOC; | ||||
class BlockValidationOptions { | class BlockValidationOptions { | ||||
private: | private: | ||||
uint64_t excessiveBlockSize; | uint64_t excessiveBlockSize; | ||||
bool checkPoW : 1; | bool checkPoW : 1; | ||||
bool checkMerkleRoot : 1; | bool checkMerkleRoot : 1; | ||||
▲ Show 20 Lines • Show All 1,098 Lines • ▼ Show 20 Lines | public: | ||||
const Config &GetConfig() const { return m_options.config; } | const Config &GetConfig() const { return m_options.config; } | ||||
const CChainParams &GetParams() const { | const CChainParams &GetParams() const { | ||||
return m_options.config.GetChainParams(); | return m_options.config.GetChainParams(); | ||||
} | } | ||||
const Consensus::Params &GetConsensus() const { | const Consensus::Params &GetConsensus() const { | ||||
return m_options.config.GetChainParams().GetConsensus(); | return m_options.config.GetChainParams().GetConsensus(); | ||||
} | } | ||||
const arith_uint256 &MinimumChainWork() const { | |||||
return *Assert(m_options.minimum_chain_work); | |||||
} | |||||
const BlockHash &AssumedValidBlock() const { | const BlockHash &AssumedValidBlock() const { | ||||
return *Assert(m_options.assumed_valid_block); | return *Assert(m_options.assumed_valid_block); | ||||
} | } | ||||
/** | /** | ||||
* Alias for ::cs_main. | * Alias for ::cs_main. | ||||
* Should be used in new code to make it easier to make ::cs_main a member | * Should be used in new code to make it easier to make ::cs_main a member | ||||
* of this class. | * of this class. | ||||
▲ Show 20 Lines • Show All 250 Lines • Show Last 20 Lines |