Bitcoin Core 28.99.0
P2P Digital Currency
Classes | Macros | Functions
chainparams.cpp File Reference
#include <kernel/chainparams.h>
#include <chainparamsseeds.h>
#include <consensus/amount.h>
#include <consensus/merkle.h>
#include <consensus/params.h>
#include <hash.h>
#include <kernel/messagestartchars.h>
#include <logging.h>
#include <primitives/block.h>
#include <primitives/transaction.h>
#include <script/interpreter.h>
#include <script/script.h>
#include <uint256.h>
#include <util/chaintype.h>
#include <util/strencodings.h>
#include <algorithm>
#include <cassert>
#include <cstdint>
#include <cstring>
#include <type_traits>
Include dependency graph for chainparams.cpp:

Go to the source code of this file.

Classes

class  CMainParams
 Main network on which people trade goods and services. More...
 
class  CTestNetParams
 Testnet (v3): public test network which is reset from time to time. More...
 
class  CTestNet4Params
 Testnet (v4): public test network which is reset from time to time. More...
 
class  SigNetParams
 Signet: test network with an additional consensus parameter (see BIP325). More...
 
class  CRegTestParams
 Regression test: intended for private networks only. More...
 

Macros

#define consteval_ctor(input)   (input)
 

Functions

static CBlock CreateGenesisBlock (const char *pszTimestamp, const CScript &genesisOutputScript, uint32_t nTime, uint32_t nNonce, uint32_t nBits, int32_t nVersion, const CAmount &genesisReward)
 
static CBlock CreateGenesisBlock (uint32_t nTime, uint32_t nNonce, uint32_t nBits, int32_t nVersion, const CAmount &genesisReward)
 Build the genesis block. More...
 
std::optional< ChainTypeGetNetworkForMagic (const MessageStartChars &message)
 

Macro Definition Documentation

◆ consteval_ctor

#define consteval_ctor (   input)    (input)

Definition at line 38 of file chainparams.cpp.

Function Documentation

◆ CreateGenesisBlock() [1/2]

static CBlock CreateGenesisBlock ( const char *  pszTimestamp,
const CScript genesisOutputScript,
uint32_t  nTime,
uint32_t  nNonce,
uint32_t  nBits,
int32_t  nVersion,
const CAmount genesisReward 
)
static

Definition at line 41 of file chainparams.cpp.

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

◆ CreateGenesisBlock() [2/2]

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

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 73 of file chainparams.cpp.

Here is the call graph for this function:

◆ GetNetworkForMagic()

std::optional< ChainType > GetNetworkForMagic ( const MessageStartChars message)

Definition at line 691 of file chainparams.cpp.

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