Changeset View
Changeset View
Standalone View
Standalone View
src/chainparams.h
Show First 20 Lines • Show All 79 Lines • ▼ Show 20 Lines | public: | ||||
uint64_t AssumedChainStateSize() const { | uint64_t AssumedChainStateSize() const { | ||||
return m_assumed_chain_state_size; | return m_assumed_chain_state_size; | ||||
} | } | ||||
/** Whether it is possible to mine blocks on demand (no retargeting) */ | /** Whether it is possible to mine blocks on demand (no retargeting) */ | ||||
bool MineBlocksOnDemand() const { return consensus.fPowNoRetargeting; } | bool MineBlocksOnDemand() const { return consensus.fPowNoRetargeting; } | ||||
/** Return the BIP70 network string (main, test or regtest) */ | /** Return the BIP70 network string (main, test or regtest) */ | ||||
std::string NetworkIDString() const { return strNetworkID; } | std::string NetworkIDString() const { return strNetworkID; } | ||||
/** Return the list of hostnames to look up for DNS seeds */ | /** Return the list of hostnames to look up for DNS seeds */ | ||||
const std::vector<std::string> &DNSSeeds() const { return vSeeds; } | |||||
const std::vector<uint8_t> &Base58Prefix(Base58Type type) const { | const std::vector<uint8_t> &Base58Prefix(Base58Type type) const { | ||||
return base58Prefixes[type]; | return base58Prefixes[type]; | ||||
} | } | ||||
const std::string &CashAddrPrefix() const { return cashaddrPrefix; } | const std::string &CashAddrPrefix() const { return cashaddrPrefix; } | ||||
const std::vector<SeedSpec6> &FixedSeeds() const { return vFixedSeeds; } | const std::vector<SeedSpec6> &FixedSeeds() const { return vFixedSeeds; } | ||||
const CCheckpointData &Checkpoints() const { return checkpointData; } | const CCheckpointData &Checkpoints() const { return checkpointData; } | ||||
const ChainTxData &TxData() const { return chainTxData; } | const ChainTxData &TxData() const { return chainTxData; } | ||||
Show All 14 Lines | protected: | ||||
CBlock genesis; | CBlock genesis; | ||||
std::vector<SeedSpec6> vFixedSeeds; | std::vector<SeedSpec6> vFixedSeeds; | ||||
bool fDefaultConsistencyChecks; | bool fDefaultConsistencyChecks; | ||||
bool fRequireStandard; | bool fRequireStandard; | ||||
bool m_is_test_chain; | bool m_is_test_chain; | ||||
bool m_is_mockable_chain; | bool m_is_mockable_chain; | ||||
CCheckpointData checkpointData; | CCheckpointData checkpointData; | ||||
ChainTxData chainTxData; | ChainTxData chainTxData; | ||||
friend const std::vector<std::string> | |||||
GetRandomizedDNSSeeds(const CChainParams ¶ms); | |||||
}; | }; | ||||
/** | /** | ||||
* Creates and returns a std::unique_ptr<CChainParams> of the chosen chain. | * Creates and returns a std::unique_ptr<CChainParams> of the chosen chain. | ||||
* @returns a CChainParams* of the chosen chain. | * @returns a CChainParams* of the chosen chain. | ||||
* @throws a std::runtime_error if the chain is not supported. | * @throws a std::runtime_error if the chain is not supported. | ||||
*/ | */ | ||||
std::unique_ptr<CChainParams> CreateChainParams(const std::string &chain); | std::unique_ptr<CChainParams> CreateChainParams(const std::string &chain); | ||||
Show All 19 Lines |