Bitcoin ABC 0.30.7
P2P Digital Currency
Functions | Variables
chainparams.cpp File Reference
#include <chainparams.h>
#include <common/args.h>
#include <consensus/merkle.h>
#include <currencyunit.h>
#include <logging.h>
#include <tinyformat.h>
#include <cassert>
Include dependency graph for chainparams.cpp:

Go to the source code of this file.

Functions

const CChainParamsParams ()
 Return the currently selected parameters. More...
 
void ReadChainArgs (const ArgsManager &args, CChainParams::ChainOptions &options)
 
std::unique_ptr< const CChainParamsCreateChainParams (const ArgsManager &args, const std::string &chain)
 Creates and returns a std::unique_ptr<CChainParams> of the chosen chain. More...
 
void SelectParams (const std::string &network)
 Sets the params returned by Params() to those for the given BIP70 chain name. More...
 

Variables

static std::unique_ptr< const CChainParamsglobalChainParams
 

Function Documentation

◆ CreateChainParams()

std::unique_ptr< const CChainParams > CreateChainParams ( const ArgsManager args,
const std::string &  chain 
)

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

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

Definition at line 32 of file chainparams.cpp.

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

◆ Params()

const CChainParams & Params ( )

Return the currently selected parameters.

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

Definition at line 19 of file chainparams.cpp.

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

◆ ReadChainArgs()

void ReadChainArgs ( const ArgsManager args,
CChainParams::ChainOptions options 
)

Definition at line 24 of file chainparams.cpp.

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

◆ SelectParams()

void SelectParams ( const std::string &  chain)

Sets the params returned by Params() to those for the given BIP70 chain name.

Exceptions
std::runtime_errorwhen the chain is not supported.

Definition at line 51 of file chainparams.cpp.

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

Variable Documentation

◆ globalChainParams

std::unique_ptr<const CChainParams> globalChainParams
static

Definition at line 17 of file chainparams.cpp.