Changeset View
Changeset View
Standalone View
Standalone View
src/chainparams.h
Show First 20 Lines • Show All 100 Lines • ▼ Show 20 Lines | |||||
/** | /** | ||||
* 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); | ||||
CBlock CreateGenesisBlock(uint32_t nTime, uint32_t nNonce, uint32_t nBits, | |||||
int32_t nVersion, const Amount genesisReward); | |||||
/** | /** | ||||
* Return the currently selected parameters. This won't change after app | * Return the currently selected parameters. This won't change after app | ||||
* startup, except for unit tests. | * startup, except for unit tests. | ||||
*/ | */ | ||||
const CChainParams &Params(); | const CChainParams &Params(); | ||||
/** | /** | ||||
* Sets the params returned by Params() to those for the given BIP70 chain name. | * Sets the params returned by Params() to those for the given BIP70 chain name. | ||||
* @throws std::runtime_error when the chain is not supported. | * @throws std::runtime_error when the chain is not supported. | ||||
*/ | */ | ||||
void SelectParams(const std::string &chain); | void SelectParams(const std::string &chain); | ||||
#endif // BITCOIN_CHAINPARAMS_H | #endif // BITCOIN_CHAINPARAMS_H |