Bitcoin ABC  0.26.3
P2P Digital Currency
Classes | Typedefs | Functions
chainparams.h File Reference
#include <chainparamsbase.h>
#include <consensus/params.h>
#include <netaddress.h>
#include <primitives/block.h>
#include <protocol.h>
#include <util/hash_type.h>
#include <memory>
#include <string>
#include <vector>
Include dependency graph for chainparams.h:

Go to the source code of this file.

Classes

struct  SeedSpec6
 
struct  CCheckpointData
 
struct  AssumeutxoHash
 
struct  AssumeutxoData
 Holds configuration for use during UTXO snapshot load and validation. More...
 
struct  ChainTxData
 Holds various statistics on transactions within a chain. More...
 
class  CChainParams
 CChainParams defines various tweakable parameters of a given instance of the Bitcoin system. More...
 

Typedefs

typedef std::map< int, BlockHashMapCheckpoints
 
using MapAssumeutxo = std::map< int, const AssumeutxoData >
 

Functions

std::unique_ptr< CChainParamsCreateChainParams (const std::string &chain)
 Creates and returns a std::unique_ptr<CChainParams> of the chosen chain. More...
 
CBlock CreateGenesisBlock (uint32_t nTime, uint32_t nNonce, uint32_t nBits, int32_t nVersion, const Amount genesisReward)
 Build the genesis block. More...
 
const CChainParamsParams ()
 Return the currently selected parameters. More...
 
void SelectParams (const std::string &chain)
 Sets the params returned by Params() to those for the given BIP70 chain name. More...
 
const CCheckpointDataCheckpointData (const std::string &chain)
 

Typedef Documentation

◆ MapAssumeutxo

using MapAssumeutxo = std::map<int, const AssumeutxoData>

Definition at line 53 of file chainparams.h.

◆ MapCheckpoints

typedef std::map<int, BlockHash> MapCheckpoints

Definition at line 25 of file chainparams.h.

Function Documentation

◆ CheckpointData()

const CCheckpointData& CheckpointData ( const std::string &  chain)

Definition at line 137 of file checkpoints.cpp.

Here is the caller graph for this function:

◆ CreateChainParams()

std::unique_ptr<CChainParams> CreateChainParams ( 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 499 of file chainparams.cpp.

Here is the caller graph for this function:

◆ CreateGenesisBlock()

CBlock CreateGenesisBlock ( uint32_t  nTime,
uint32_t  nNonce,
uint32_t  nBits,
int32_t  nVersion,
const Amount  genesisReward 
)

Build the genesis block.

Note that the output of its generation transaction cannot be spent since it did not originally exist in the database.

CBlock(hash=000000000019d6, ver=1, hashPrevBlock=00000000000000, hashMerkleRoot=4a5e1e, nTime=1231006505, nBits=1d00ffff, nNonce=2083236893, vtx=1) CTransaction(hash=4a5e1e, ver=1, vin.size=1, vout.size=1, nLockTime=0) CTxIn(COutPoint(000000, -1), coinbase 04ffff001d0104455468652054696d65732030332f4a616e2f32303039204368616e63656c6c6f72206f6e206272696e6b206f66207365636f6e64206261696c6f757420666f722062616e6b73) CTxOut(nValue=50.00000000, scriptPubKey=0x5F1DF16B2B704C8A578D0B) vMerkleTree: 4a5e1e

Definition at line 59 of file chainparams.cpp.

Here is the call 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 494 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 516 of file chainparams.cpp.

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