Dogecoin Core  1.14.2
P2P Digital Currency
chainparamsbase.h
Go to the documentation of this file.
1 // Copyright (c) 2014-2015 The Bitcoin Core developers
2 // Distributed under the MIT software license, see the accompanying
3 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
4 
5 #ifndef BITCOIN_CHAINPARAMSBASE_H
6 #define BITCOIN_CHAINPARAMSBASE_H
7 
8 #include <string>
9 #include <vector>
10 
16 {
17 public:
19  static const std::string MAIN;
20  static const std::string TESTNET;
21  static const std::string REGTEST;
22 
23  const std::string& DataDir() const { return strDataDir; }
24  int RPCPort() const { return nRPCPort; }
25 
26 protected:
28 
29  int nRPCPort;
30  std::string strDataDir;
31 };
32 
37 void AppendParamsHelpMessages(std::string& strUsage, bool debugHelp=true);
38 
44 
45 CBaseChainParams& BaseParams(const std::string& chain);
46 
48 void SelectBaseParams(const std::string& chain);
49 
54 std::string ChainNameFromCommandLine();
55 
61 
62 #endif // BITCOIN_CHAINPARAMSBASE_H
const CBaseChainParams & BaseParams()
Return the currently selected parameters.
bool AreBaseParamsConfigured()
Return true if SelectBaseParamsFromCommandLine() has been called to select a network.
std::string ChainNameFromCommandLine()
Looks for -regtest, -testnet and returns the appropriate BIP70 chain name.
void AppendParamsHelpMessages(std::string &strUsage, bool debugHelp=true)
Append the help messages for the chainparams options to the parameter string.
void SelectBaseParams(const std::string &chain)
Sets the params returned by Params() to those for the given network.
CBaseChainParams defines the base parameters (shared between bitcoin-cli and bitcoind) of a given ins...
static const std::string REGTEST
const std::string & DataDir() const
int RPCPort() const
static const std::string TESTNET
static const std::string MAIN
BIP70 chain name strings (main, test or regtest)
std::string strDataDir