Bitcoin Core  0.18.99
P2P Digital Currency
Functions | Variables
chainparamsbase.cpp File Reference
#include <chainparamsbase.h>
#include <tinyformat.h>
#include <util/system.h>
#include <util/memory.h>
#include <assert.h>
Include dependency graph for chainparamsbase.cpp:

Go to the source code of this file.

Functions

void SetupChainParamsBaseOptions ()
 Set the arguments for chainparams. 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...
 

Variables

static std::unique_ptr< CBaseChainParamsglobalChainBaseParams
 

Function Documentation

◆ BaseParams()

const CBaseChainParams& BaseParams ( )

Return the currently selected parameters.

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

Definition at line 29 of file chainparamsbase.cpp.

Here is the caller graph for this function:

◆ CreateBaseChainParams()

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 35 of file chainparamsbase.cpp.

Here is the caller graph for this function:

◆ SelectBaseParams()

void SelectBaseParams ( const std::string &  chain)

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

Definition at line 47 of file chainparamsbase.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ SetupChainParamsBaseOptions()

void SetupChainParamsBaseOptions ( )

Set the arguments for chainparams.

Definition at line 18 of file chainparamsbase.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ globalChainBaseParams

std::unique_ptr<CBaseChainParams> globalChainBaseParams
static

Definition at line 27 of file chainparamsbase.cpp.