Fabcoin Core  0.16.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 FABCOIN_CHAINPARAMSBASE_H
6 #define FABCOIN_CHAINPARAMSBASE_H
7 
8 #include <memory>
9 #include <string>
10 #include <vector>
11 
17 {
18 public:
20  static const std::string MAIN;
21  static const std::string TESTNET;
22  static const std::string REGTEST;
23  static const std::string UNITTEST;
24 
25  const std::string& DataDir() const { return strDataDir; }
26  int RPCPort() const { return nRPCPort; }
27 
28 protected:
30 
31  int nRPCPort;
32  std::string strDataDir;
33 };
34 
40 std::unique_ptr<CBaseChainParams> CreateBaseChainParams(const std::string& chain);
41 
46 void AppendParamsHelpMessages(std::string& strUsage, bool debugHelp=true);
47 
53 
55 void SelectBaseParams(const std::string& chain);
56 
61 std::string ChainNameFromCommandLine();
62 
63 #endif // FABCOIN_CHAINPARAMSBASE_H
void SelectBaseParams(const std::string &chain)
Sets the params returned by Params() to those for the given network.
static const std::string REGTEST
std::string strDataDir
static const std::string UNITTEST
std::unique_ptr< CBaseChainParams > CreateBaseChainParams(const std::string &chain)
Creates and returns a std::unique_ptr<CBaseChainParams> of the chosen chain.
void AppendParamsHelpMessages(std::string &strUsage, bool debugHelp=true)
Append the help messages for the chainparams options to the parameter string.
static const std::string MAIN
BIP70 chain name strings (main, test or regtest)
std::string ChainNameFromCommandLine()
Looks for -regtest, -testnet and returns the appropriate BIP70 chain name.
const CBaseChainParams & BaseParams()
Return the currently selected parameters.
int RPCPort() const
CBaseChainParams defines the base parameters (shared between fabcoin-cli and fabcoind) of a given ins...
static const std::string TESTNET
const std::string & DataDir() const