Raven Core  3.0.0
P2P Digital Currency
chainparamsbase.h
Go to the documentation of this file.
1 // Copyright (c) 2014-2015 The Bitcoin Core developers
2 // Copyright (c) 2017-2019 The Raven Core developers
3 // Distributed under the MIT software license, see the accompanying
4 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
5 
6 #ifndef RAVEN_CHAINPARAMSBASE_H
7 #define RAVEN_CHAINPARAMSBASE_H
8 
9 #include <memory>
10 #include <string>
11 #include <vector>
12 
18 {
19 public:
21  static const std::string MAIN;
22  static const std::string TESTNET;
23  static const std::string REGTEST;
24 
25  const std::string& DataDir() const { return strDataDir; }
26  int RPCPort() const { return nRPCPort; }
27 
28 
29 protected:
31 
32  int nRPCPort;
33  std::string strDataDir;
34 };
35 
41 std::unique_ptr<CBaseChainParams> CreateBaseChainParams(const std::string& chain);
42 
47 void AppendParamsHelpMessages(std::string& strUsage, bool debugHelp=true);
48 
54 
56 void SelectBaseParams(const std::string& chain);
57 
62 std::string ChainNameFromCommandLine();
63 
64 #endif // RAVEN_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
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.
const std::string & DataDir() const
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 raven-cli and ravend) of a given instanc...
static const std::string TESTNET