Changeset View
Changeset View
Standalone View
Standalone View
src/chainparamsbase.h
Show All 18 Lines | public: | ||||
/** BIP70 chain name strings (main, test or regtest) */ | /** BIP70 chain name strings (main, test or regtest) */ | ||||
static const std::string MAIN; | static const std::string MAIN; | ||||
static const std::string TESTNET; | static const std::string TESTNET; | ||||
static const std::string REGTEST; | static const std::string REGTEST; | ||||
const std::string &DataDir() const { return strDataDir; } | const std::string &DataDir() const { return strDataDir; } | ||||
int RPCPort() const { return nRPCPort; } | int RPCPort() const { return nRPCPort; } | ||||
protected: | CBaseChainParams() = delete; | ||||
CBaseChainParams() {} | CBaseChainParams(const std::string &data_dir, int rpc_port) | ||||
: nRPCPort(rpc_port), strDataDir(data_dir) {} | |||||
private: | |||||
int nRPCPort; | int nRPCPort; | ||||
std::string strDataDir; | std::string strDataDir; | ||||
}; | }; | ||||
/** | /** | ||||
* Creates and returns a std::unique_ptr<CBaseChainParams> of the chosen chain. | * Creates and returns a std::unique_ptr<CBaseChainParams> of the chosen chain. | ||||
* @returns a CBaseChainParams* of the chosen chain. | * @returns a CBaseChainParams* 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. | ||||
Show All 19 Lines |