Fabcoin Core  0.16.2
P2P Digital Currency
Classes | Functions
chainparamsbase.cpp File Reference
#include <chainparamsbase.h>
#include <tinyformat.h>
#include <util.h>
#include <assert.h>
Include dependency graph for chainparamsbase.cpp:

Go to the source code of this file.

Classes

class  CBaseMainParams
 Main network. More...
 
class  CBaseTestNetParams
 Testnet (v3) More...
 
class  CBaseRegTestParams
 

Functions

void AppendParamsHelpMessages (std::string &strUsage, bool debugHelp)
 Append the help messages for the chainparams options to the parameter string. More...
 
const CBaseChainParamsBaseParams ()
 Return the currently selected parameters. More...
 
std::unique_ptr< CBaseChainParamsCreateBaseChainParams (const std::string &chain)
 Creates and returns a std::unique_ptr<CBaseChainParams> of the chosen chain. More...
 
void SelectBaseParams (const std::string &chain)
 Sets the params returned by Params() to those for the given network. More...
 
std::string ChainNameFromCommandLine ()
 Looks for -regtest, -testnet and returns the appropriate BIP70 chain name. More...
 

Function Documentation

void AppendParamsHelpMessages ( std::string &  strUsage,
bool  debugHelp 
)

Append the help messages for the chainparams options to the parameter string.

Definition at line 18 of file chainparamsbase.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

const CBaseChainParams& BaseParams ( )

Return the currently selected parameters.

This won't change after app startup, except for unit tests.

Definition at line 68 of file chainparamsbase.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

std::string ChainNameFromCommandLine ( )

Looks for -regtest, -testnet and returns the appropriate BIP70 chain name.

Returns
CBaseChainParams::MAX_NETWORK_TYPES if an invalid combination is given. CBaseChainParams::MAIN by default.

Definition at line 93 of file chainparamsbase.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

std::unique_ptr<CBaseChainParams> CreateBaseChainParams ( const std::string &  chain)

Creates and returns a std::unique_ptr<CBaseChainParams> of the chosen chain.

Returns
a CBaseChainParams* of the chosen chain.
Exceptions
astd::runtime_error if the chain is not supported.

Definition at line 74 of file chainparamsbase.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void SelectBaseParams ( const std::string &  chain)

Sets the params returned by Params() to those for the given network.

Definition at line 88 of file chainparamsbase.cpp.

Here is the call graph for this function:

Here is the caller graph for this function: