Bitcoin Core  22.99.0
P2P Digital Currency
Classes | Typedefs | Enumerations | Functions | Variables
node Namespace Reference

Classes

class  BlockAssembler
 Generate a new block, without valid proof-of-work. More...
 
class  BlockManager
 Maintains a tree of blocks (stored in m_block_index) which is consulted to determine where the most-work tip is. More...
 
struct  CacheSizes
 
struct  CBlockIndexWorkComparator
 
struct  CBlockTemplate
 
struct  CCoinsStats
 
struct  CImportingNow
 
struct  CompareCTxMemPoolIter
 Comparator for CTxMemPool::txiter objects. More...
 
struct  CompareTxIterByAncestorCount
 
struct  CTxMemPoolModifiedEntry
 
struct  modifiedentry_iter
 
struct  NodeContext
 NodeContext struct containing references to chain state and connection state. More...
 
struct  PSBTAnalysis
 Holds the results of AnalyzePSBT (miscellaneous information about a PSBT) More...
 
struct  PSBTInputAnalysis
 Holds an analysis of one input from a PSBT. More...
 
class  SnapshotMetadata
 Metadata describing a serialized version of a UTXO set from which an assumeutxo CChainState can be constructed. More...
 
struct  update_for_parent_inclusion
 

Typedefs

typedef std::unordered_map< uint256, CBlockIndex *, BlockHasherBlockMap
 
typedef boost::multi_index_container< CTxMemPoolModifiedEntry, boost::multi_index::indexed_by< boost::multi_index::ordered_unique< modifiedentry_iter, CompareCTxMemPoolIter >, boost::multi_index::ordered_non_unique< boost::multi_index::tag< ancestor_score >, boost::multi_index::identity< CTxMemPoolModifiedEntry >, CompareTxMemPoolEntryByAncestorFee > >> indexed_modified_transaction_set
 
typedef indexed_modified_transaction_set::nth_index< 0 >::type::iterator modtxiter
 
typedef indexed_modified_transaction_set::index< ancestor_score >::type::iterator modtxscoreiter
 

Enumerations

enum  ChainstateLoadingError {
  ChainstateLoadingError::ERROR_LOADING_BLOCK_DB, ChainstateLoadingError::ERROR_BAD_GENESIS_BLOCK, ChainstateLoadingError::ERROR_PRUNED_NEEDS_REINDEX, ChainstateLoadingError::ERROR_LOAD_GENESIS_BLOCK_FAILED,
  ChainstateLoadingError::ERROR_CHAINSTATE_UPGRADE_FAILED, ChainstateLoadingError::ERROR_REPLAYBLOCKS_FAILED, ChainstateLoadingError::ERROR_LOADCHAINTIP_FAILED, ChainstateLoadingError::ERROR_GENERIC_BLOCKDB_OPEN_FAILED,
  ChainstateLoadingError::ERROR_BLOCKS_WITNESS_INSUFFICIENTLY_VALIDATED, ChainstateLoadingError::SHUTDOWN_PROBED
}
 
enum  ChainstateLoadVerifyError { ChainstateLoadVerifyError::ERROR_BLOCK_FROM_FUTURE, ChainstateLoadVerifyError::ERROR_CORRUPTED_BLOCK_DB, ChainstateLoadVerifyError::ERROR_GENERIC_FAILURE }
 
enum  CoinStatsHashType { CoinStatsHashType::HASH_SERIALIZED, CoinStatsHashType::MUHASH, CoinStatsHashType::NONE }
 

Functions

std::atomic_bool fImporting (false)
 
std::atomic_bool fReindex (false)
 
static FILE * OpenUndoFile (const FlatFilePos &pos, bool fReadOnly)
 Open an undo file (rev?????.dat) More...
 
static FlatFileSeq BlockFileSeq ()
 
static FlatFileSeq UndoFileSeq ()
 
bool IsBlockPruned (const CBlockIndex *pblockindex)
 Check whether the block associated with this index entry is pruned or not. More...
 
void CleanupBlockRevFiles ()
 
static bool UndoWriteToDisk (const CBlockUndo &blockundo, FlatFilePos &pos, const uint256 &hashBlock, const CMessageHeader::MessageStartChars &messageStart)
 
bool UndoReadFromDisk (CBlockUndo &blockundo, const CBlockIndex *pindex)
 
void UnlinkPrunedFiles (const std::set< int > &setFilesToPrune)
 Actually unlink the specified files. More...
 
FILE * OpenBlockFile (const FlatFilePos &pos, bool fReadOnly=false)
 Open a block file (blk?????.dat) More...
 
fs::path GetBlockPosFilename (const FlatFilePos &pos)
 Translation to a filesystem path. More...
 
static bool WriteBlockToDisk (const CBlock &block, FlatFilePos &pos, const CMessageHeader::MessageStartChars &messageStart)
 
bool ReadBlockFromDisk (CBlock &block, const FlatFilePos &pos, const Consensus::Params &consensusParams)
 Functions for disk access for blocks. More...
 
bool ReadBlockFromDisk (CBlock &block, const CBlockIndex *pindex, const Consensus::Params &consensusParams)
 
bool ReadRawBlockFromDisk (std::vector< uint8_t > &block, const FlatFilePos &pos, const CMessageHeader::MessageStartChars &message_start)
 
bool ReadRawBlockFromDisk (std::vector< uint8_t > &block, const CBlockIndex *pindex, const CMessageHeader::MessageStartChars &message_start)
 
void ThreadImport (ChainstateManager &chainman, std::vector< fs::path > vImportFiles, const ArgsManager &args)
 
CacheSizes CalculateCacheSizes (const ArgsManager &args, size_t n_indexes)
 
std::optional< ChainstateLoadingErrorLoadChainstate (bool fReset, ChainstateManager &chainman, CTxMemPool *mempool, bool fPruneMode, const Consensus::Params &consensus_params, bool fReindexChainState, int64_t nBlockTreeDBCache, int64_t nCoinDBCache, int64_t nCoinCacheUsage, bool block_tree_db_in_memory, bool coins_db_in_memory, std::function< bool()> shutdown_requested=nullptr, std::function< void()> coins_error_cb=nullptr)
 This sequence can have 4 types of outcomes: More...
 
std::optional< ChainstateLoadVerifyErrorVerifyLoadedChainstate (ChainstateManager &chainman, bool fReset, bool fReindexChainState, const Consensus::Params &consensus_params, unsigned int check_blocks, unsigned int check_level, std::function< int64_t()> get_unix_time_seconds)
 
void FindCoins (const node::NodeContext &node, std::map< COutPoint, Coin > &coins)
 Look up unspent output information. More...
 
uint64_t GetBogoSize (const CScript &script_pub_key)
 
CDataStream TxOutSer (const COutPoint &outpoint, const Coin &coin)
 
static void ApplyHash (CHashWriter &ss, const uint256 &hash, const std::map< uint32_t, Coin > &outputs)
 Warning: be very careful when changing this! assumeutxo and UTXO snapshot validation commitments are reliant on the hash constructed by this function. More...
 
static void ApplyHash (std::nullptr_t, const uint256 &hash, const std::map< uint32_t, Coin > &outputs)
 
static void ApplyHash (MuHash3072 &muhash, const uint256 &hash, const std::map< uint32_t, Coin > &outputs)
 
static void ApplyStats (CCoinsStats &stats, const uint256 &hash, const std::map< uint32_t, Coin > &outputs)
 
template<typename T >
static bool GetUTXOStats (CCoinsView *view, BlockManager &blockman, CCoinsStats &stats, T hash_obj, const std::function< void()> &interruption_point, const CBlockIndex *pindex)
 Calculate statistics about the unspent transaction output set. More...
 
bool GetUTXOStats (CCoinsView *view, node::BlockManager &blockman, CCoinsStats &stats, const std::function< void()> &interruption_point={}, const CBlockIndex *pindex=nullptr)
 Calculate statistics about the unspent transaction output set. More...
 
static void PrepareHash (CHashWriter &ss, const CCoinsStats &stats)
 
static void PrepareHash (MuHash3072 &muhash, CCoinsStats &stats)
 
static void PrepareHash (std::nullptr_t, CCoinsStats &stats)
 
static void FinalizeHash (CHashWriter &ss, CCoinsStats &stats)
 
static void FinalizeHash (MuHash3072 &muhash, CCoinsStats &stats)
 
static void FinalizeHash (std::nullptr_t, CCoinsStats &stats)
 
int64_t UpdateTime (CBlockHeader *pblock, const Consensus::Params &consensusParams, const CBlockIndex *pindexPrev)
 
void RegenerateCommitments (CBlock &block, ChainstateManager &chainman)
 Update an old GenerateCoinbaseCommitment from CreateNewBlock after the block txs have changed. More...
 
static BlockAssembler::Options DefaultOptions ()
 
void IncrementExtraNonce (CBlock *pblock, const CBlockIndex *pindexPrev, unsigned int &nExtraNonce)
 Modify the extranonce in a block. More...
 
Minisketch MakeMinisketch32 (size_t capacity)
 Wrapper around Minisketch::Minisketch(32, implementation, capacity). More...
 
Minisketch MakeMinisketch32FP (size_t max_elements, uint32_t fpbits)
 Wrapper around Minisketch::CreateFP. More...
 
PSBTAnalysis AnalyzePSBT (PartiallySignedTransaction psbtx)
 Provides helpful miscellaneous information about where a PSBT is in the signing workflow. More...
 
static TransactionError HandleATMPError (const TxValidationState &state, std::string &err_string_out)
 
TransactionError BroadcastTransaction (NodeContext &node, CTransactionRef tx, std::string &err_string, const CAmount &max_tx_fee, bool relay, bool wait_callback)
 Submit a transaction to the mempool and (optionally) relay it to all P2P peers. More...
 
CTransactionRef GetTransaction (const CBlockIndex *const block_index, const CTxMemPool *const mempool, const uint256 &hash, const Consensus::Params &consensusParams, uint256 &hashBlock)
 Return transaction with a given hash. More...
 

Variables

bool fHavePruned = false
 Pruning-related variables and constants. More...
 
bool fPruneMode = false
 True if we're running in -prune mode. More...
 
uint64_t nPruneTarget = 0
 Number of MiB of block files that we're trying to stay below. More...
 
static constexpr bool DEFAULT_STOPAFTERBLOCKIMPORT {false}
 
static const unsigned int BLOCKFILE_CHUNK_SIZE = 0x1000000
 The pre-allocation chunk size for blk?????.dat files (since 0.8) More...
 
static const unsigned int UNDOFILE_CHUNK_SIZE = 0x100000
 The pre-allocation chunk size for rev?????.dat files (since 0.8) More...
 
static const unsigned int MAX_BLOCKFILE_SIZE = 0x8000000
 The maximum size of a blk?????.dat file (since 0.8) More...
 
std::atomic_bool fImporting
 
std::atomic_bool fReindex
 
static const bool DEFAULT_PRINTPRIORITY = false
 
static const CFeeRate DEFAULT_MAX_RAW_TX_FEE_RATE {COIN / 10}
 Maximum fee rate for sendrawtransaction and testmempoolaccept RPC calls. More...
 

Typedef Documentation

◆ BlockMap

typedef std::unordered_map<uint256, CBlockIndex*, BlockHasher> node::BlockMap

Definition at line 52 of file blockstorage.h.

◆ indexed_modified_transaction_set

typedef boost::multi_index_container< CTxMemPoolModifiedEntry, boost::multi_index::indexed_by< boost::multi_index::ordered_unique< modifiedentry_iter, CompareCTxMemPoolIter >, boost::multi_index::ordered_non_unique< boost::multi_index::tag<ancestor_score>, boost::multi_index::identity<CTxMemPoolModifiedEntry>, CompareTxMemPoolEntryByAncestorFee > >> node::indexed_modified_transaction_set

Definition at line 108 of file miner.h.

◆ modtxiter

typedef indexed_modified_transaction_set::nth_index<0>::type::iterator node::modtxiter

Definition at line 110 of file miner.h.

◆ modtxscoreiter

typedef indexed_modified_transaction_set::index<ancestor_score>::type::iterator node::modtxscoreiter

Definition at line 111 of file miner.h.

Enumeration Type Documentation

◆ ChainstateLoadingError

Enumerator
ERROR_LOADING_BLOCK_DB 
ERROR_BAD_GENESIS_BLOCK 
ERROR_PRUNED_NEEDS_REINDEX 
ERROR_LOAD_GENESIS_BLOCK_FAILED 
ERROR_CHAINSTATE_UPGRADE_FAILED 
ERROR_REPLAYBLOCKS_FAILED 
ERROR_LOADCHAINTIP_FAILED 
ERROR_GENERIC_BLOCKDB_OPEN_FAILED 
ERROR_BLOCKS_WITNESS_INSUFFICIENTLY_VALIDATED 
SHUTDOWN_PROBED 

Definition at line 19 of file chainstate.h.

◆ ChainstateLoadVerifyError

Enumerator
ERROR_BLOCK_FROM_FUTURE 
ERROR_CORRUPTED_BLOCK_DB 
ERROR_GENERIC_FAILURE 

Definition at line 72 of file chainstate.h.

◆ CoinStatsHashType

Enumerator
HASH_SERIALIZED 
MUHASH 
NONE 

Definition at line 24 of file coinstats.h.

Function Documentation

◆ AnalyzePSBT()

PSBTAnalysis node::AnalyzePSBT ( PartiallySignedTransaction  psbtx)

Provides helpful miscellaneous information about where a PSBT is in the signing workflow.

Parameters
[in]psbtxthe PSBT to analyze
Returns
A PSBTAnalysis with information about the provided PSBT.

Definition at line 16 of file psbt.cpp.

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

◆ ApplyHash() [1/3]

static void node::ApplyHash ( CHashWriter ss,
const uint256 hash,
const std::map< uint32_t, Coin > &  outputs 
)
static

Warning: be very careful when changing this! assumeutxo and UTXO snapshot validation commitments are reliant on the hash constructed by this function.

If the construction of this hash is changed, it will invalidate existing UTXO snapshots. This will not result in any kind of consensus failure, but it will force clients that were expecting to make use of assumeutxo to do traditional IBD instead.

It is also possible, though very unlikely, that a change in this construction could cause a previously invalid (and potentially malicious) UTXO snapshot to be considered valid.

Definition at line 52 of file coinstats.cpp.

Here is the caller graph for this function:

◆ ApplyHash() [2/3]

static void node::ApplyHash ( MuHash3072 muhash,
const uint256 hash,
const std::map< uint32_t, Coin > &  outputs 
)
static

Definition at line 72 of file coinstats.cpp.

Here is the call graph for this function:

◆ ApplyHash() [3/3]

static void node::ApplyHash ( std::nullptr_t  ,
const uint256 hash,
const std::map< uint32_t, Coin > &  outputs 
)
static

Definition at line 70 of file coinstats.cpp.

◆ ApplyStats()

static void node::ApplyStats ( CCoinsStats stats,
const uint256 hash,
const std::map< uint32_t, Coin > &  outputs 
)
static

Definition at line 81 of file coinstats.cpp.

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

◆ BlockFileSeq()

static FlatFileSeq node::BlockFileSeq ( )
static

Definition at line 587 of file blockstorage.cpp.

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

◆ BroadcastTransaction()

TransactionError node::BroadcastTransaction ( NodeContext node,
CTransactionRef  tx,
std::string &  err_string,
const CAmount max_tx_fee,
bool  relay,
bool  wait_callback 
)

Submit a transaction to the mempool and (optionally) relay it to all P2P peers.

Mempool submission can be synchronous (will await mempool entry notification over the CValidationInterface) or asynchronous (will submit and not wait for notification), depending on the value of wait_callback. wait_callback MUST NOT be set while cs_main, cs_mempool or cs_wallet are held to avoid deadlock.

Parameters
[in]nodereference to node context
[in]txthe transaction to broadcast
[out]err_stringreference to std::string to fill with error string if available
[in]max_tx_feereject txs with fees higher than this (if 0, accept any fee)
[in]relayflag if both mempool insertion and p2p relay are requested
[in]wait_callbackwait until callbacks have been processed to avoid stale result due to a sequentially RPC. return error

Definition at line 33 of file transaction.cpp.

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

◆ CalculateCacheSizes()

CacheSizes node::CalculateCacheSizes ( const ArgsManager args,
size_t  n_indexes 
)

Definition at line 12 of file caches.cpp.

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

◆ CleanupBlockRevFiles()

void node::CleanupBlockRevFiles ( )

Definition at line 441 of file blockstorage.cpp.

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

◆ DefaultOptions()

static BlockAssembler::Options node::DefaultOptions ( )
static

Definition at line 75 of file miner.cpp.

Here is the call graph for this function:

◆ fImporting()

std::atomic_bool node::fImporting ( false  )

◆ FinalizeHash() [1/3]

static void node::FinalizeHash ( CHashWriter ss,
CCoinsStats stats 
)
static

Definition at line 174 of file coinstats.cpp.

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

◆ FinalizeHash() [2/3]

static void node::FinalizeHash ( MuHash3072 muhash,
CCoinsStats stats 
)
static

Definition at line 178 of file coinstats.cpp.

Here is the call graph for this function:

◆ FinalizeHash() [3/3]

static void node::FinalizeHash ( std::nullptr_t  ,
CCoinsStats stats 
)
static

Definition at line 184 of file coinstats.cpp.

◆ FindCoins()

void node::FindCoins ( const node::NodeContext node,
std::map< COutPoint, Coin > &  coins 
)

Look up unspent output information.

Returns coins in the mempool and in the current chain UTXO set. Iterates through all the keys in the map and populates the values.

Parameters
[in]nodeThe node context to use for lookup
[in,out]coinsmap to fill

Definition at line 12 of file coin.cpp.

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

◆ fReindex()

std::atomic_bool node::fReindex ( false  )

◆ GetBlockPosFilename()

fs::path node::GetBlockPosFilename ( const FlatFilePos pos)

Translation to a filesystem path.

Definition at line 608 of file blockstorage.cpp.

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

◆ GetBogoSize()

uint64_t node::GetBogoSize ( const CScript script_pub_key)

Definition at line 22 of file coinstats.cpp.

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

◆ GetTransaction()

CTransactionRef node::GetTransaction ( const CBlockIndex *const  block_index,
const CTxMemPool *const  mempool,
const uint256 hash,
const Consensus::Params consensusParams,
uint256 hashBlock 
)

Return transaction with a given hash.

If mempool is provided and block_index is not provided, check it first for the tx. If -txindex is available, check it next for the tx. Finally, if block_index is provided, check for tx by reading entire block from disk.

Parameters
[in]block_indexThe block to read from disk, or nullptr
[in]mempoolIf provided, check mempool for tx
[in]hashThe txid
[in]consensusParamsThe params
[out]hashBlockThe block hash, if the tx was found via -txindex or block_index
Returns
The tx if found, otherwise nullptr

Definition at line 125 of file transaction.cpp.

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

◆ GetUTXOStats() [1/2]

template<typename T >
static bool node::GetUTXOStats ( CCoinsView view,
BlockManager blockman,
CCoinsStats stats,
hash_obj,
const std::function< void()> &  interruption_point,
const CBlockIndex pindex 
)
static

Calculate statistics about the unspent transaction output set.

Definition at line 96 of file coinstats.cpp.

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

◆ GetUTXOStats() [2/2]

bool node::GetUTXOStats ( CCoinsView view,
BlockManager blockman,
CCoinsStats stats,
const std::function< void()> &  interruption_point,
const CBlockIndex pindex 
)

Calculate statistics about the unspent transaction output set.

Definition at line 147 of file coinstats.cpp.

Here is the call graph for this function:

◆ HandleATMPError()

static TransactionError node::HandleATMPError ( const TxValidationState state,
std::string &  err_string_out 
)
static

Definition at line 20 of file transaction.cpp.

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

◆ IncrementExtraNonce()

void node::IncrementExtraNonce ( CBlock pblock,
const CBlockIndex pindexPrev,
unsigned int &  nExtraNonce 
)

Modify the extranonce in a block.

Definition at line 451 of file miner.cpp.

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

◆ IsBlockPruned()

bool node::IsBlockPruned ( const CBlockIndex pblockindex)

Check whether the block associated with this index entry is pruned or not.

Definition at line 430 of file blockstorage.cpp.

Here is the caller graph for this function:

◆ LoadChainstate()

std::optional< ChainstateLoadingError > node::LoadChainstate ( bool  fReset,
ChainstateManager chainman,
CTxMemPool mempool,
bool  fPruneMode,
const Consensus::Params consensus_params,
bool  fReindexChainState,
int64_t  nBlockTreeDBCache,
int64_t  nCoinDBCache,
int64_t  nCoinCacheUsage,
bool  block_tree_db_in_memory,
bool  coins_db_in_memory,
std::function< bool()>  shutdown_requested = nullptr,
std::function< void()>  coins_error_cb = nullptr 
)

This sequence can have 4 types of outcomes:

  1. Success
  2. Shutdown requested
    • nothing failed but a shutdown was triggered in the middle of the sequence
  3. Soft failure
    • a failure that might be recovered from with a reindex
  4. Hard failure
    • a failure that definitively cannot be recovered from with a reindex

Currently, LoadChainstate returns a std::optional<ChainstateLoadingError> which:

  • if has_value()
    • Either "Soft failure", "Hard failure", or "Shutdown requested", differentiable by the specific enumerator.

      Note that a return value of SHUTDOWN_PROBED means ONLY that "during this sequence, when we explicitly checked shutdown_requested() at arbitrary points, one of those calls returned true". Therefore, a return value other than SHUTDOWN_PROBED does not guarantee that shutdown hasn't been called indirectly.

  • else
    • Success!

Definition at line 12 of file chainstate.cpp.

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

◆ MakeMinisketch32()

Minisketch node::MakeMinisketch32 ( size_t  capacity)

Wrapper around Minisketch::Minisketch(32, implementation, capacity).

Definition at line 70 of file minisketchwrapper.cpp.

Here is the caller graph for this function:

◆ MakeMinisketch32FP()

Minisketch node::MakeMinisketch32FP ( size_t  max_elements,
uint32_t  fpbits 
)

Wrapper around Minisketch::CreateFP.

Definition at line 75 of file minisketchwrapper.cpp.

◆ OpenBlockFile()

FILE * node::OpenBlockFile ( const FlatFilePos pos,
bool  fReadOnly 
)

Open a block file (blk?????.dat)

Definition at line 597 of file blockstorage.cpp.

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

◆ OpenUndoFile()

static FILE * node::OpenUndoFile ( const FlatFilePos pos,
bool  fReadOnly = false 
)
static

Open an undo file (rev?????.dat)

Definition at line 603 of file blockstorage.cpp.

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

◆ PrepareHash() [1/3]

static void node::PrepareHash ( CHashWriter ss,
const CCoinsStats stats 
)
static

Definition at line 166 of file coinstats.cpp.

Here is the caller graph for this function:

◆ PrepareHash() [2/3]

static void node::PrepareHash ( MuHash3072 muhash,
CCoinsStats stats 
)
static

Definition at line 171 of file coinstats.cpp.

◆ PrepareHash() [3/3]

static void node::PrepareHash ( std::nullptr_t  ,
CCoinsStats stats 
)
static

Definition at line 172 of file coinstats.cpp.

◆ ReadBlockFromDisk() [1/2]

bool node::ReadBlockFromDisk ( CBlock block,
const CBlockIndex pindex,
const Consensus::Params consensusParams 
)

Definition at line 772 of file blockstorage.cpp.

Here is the call graph for this function:

◆ ReadBlockFromDisk() [2/2]

bool node::ReadBlockFromDisk ( CBlock block,
const FlatFilePos pos,
const Consensus::Params consensusParams 
)

Functions for disk access for blocks.

Definition at line 742 of file blockstorage.cpp.

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

◆ ReadRawBlockFromDisk() [1/2]

bool node::ReadRawBlockFromDisk ( std::vector< uint8_t > &  block,
const CBlockIndex pindex,
const CMessageHeader::MessageStartChars message_start 
)

Definition at line 821 of file blockstorage.cpp.

Here is the call graph for this function:

◆ ReadRawBlockFromDisk() [2/2]

bool node::ReadRawBlockFromDisk ( std::vector< uint8_t > &  block,
const FlatFilePos pos,
const CMessageHeader::MessageStartChars message_start 
)

Definition at line 786 of file blockstorage.cpp.

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

◆ RegenerateCommitments()

void node::RegenerateCommitments ( CBlock block,
ChainstateManager chainman 
)

Update an old GenerateCoinbaseCommitment from CreateNewBlock after the block txs have changed.

Definition at line 47 of file miner.cpp.

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

◆ ThreadImport()

void node::ThreadImport ( ChainstateManager chainman,
std::vector< fs::path vImportFiles,
const ArgsManager args 
)

Definition at line 867 of file blockstorage.cpp.

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

◆ TxOutSer()

CDataStream node::TxOutSer ( const COutPoint outpoint,
const Coin coin 
)

Definition at line 32 of file coinstats.cpp.

Here is the caller graph for this function:

◆ UndoFileSeq()

static FlatFileSeq node::UndoFileSeq ( )
static

Definition at line 592 of file blockstorage.cpp.

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

◆ UndoReadFromDisk()

bool node::UndoReadFromDisk ( CBlockUndo blockundo,
const CBlockIndex pindex 
)

Definition at line 514 of file blockstorage.cpp.

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

◆ UndoWriteToDisk()

static bool node::UndoWriteToDisk ( const CBlockUndo blockundo,
FlatFilePos pos,
const uint256 hashBlock,
const CMessageHeader::MessageStartChars messageStart 
)
static

Definition at line 485 of file blockstorage.cpp.

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

◆ UnlinkPrunedFiles()

void node::UnlinkPrunedFiles ( const std::set< int > &  setFilesToPrune)

Actually unlink the specified files.

Definition at line 577 of file blockstorage.cpp.

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

◆ UpdateTime()

int64_t node::UpdateTime ( CBlockHeader pblock,
const Consensus::Params consensusParams,
const CBlockIndex pindexPrev 
)

Definition at line 30 of file miner.cpp.

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

◆ VerifyLoadedChainstate()

std::optional< ChainstateLoadVerifyError > node::VerifyLoadedChainstate ( ChainstateManager chainman,
bool  fReset,
bool  fReindexChainState,
const Consensus::Params consensus_params,
unsigned int  check_blocks,
unsigned int  check_level,
std::function< int64_t()>  get_unix_time_seconds 
)

Definition at line 128 of file chainstate.cpp.

Here is the caller graph for this function:

◆ WriteBlockToDisk()

static bool node::WriteBlockToDisk ( const CBlock block,
FlatFilePos pos,
const CMessageHeader::MessageStartChars messageStart 
)
static

Definition at line 690 of file blockstorage.cpp.

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

Variable Documentation

◆ BLOCKFILE_CHUNK_SIZE

const unsigned int node::BLOCKFILE_CHUNK_SIZE = 0x1000000
static

The pre-allocation chunk size for blk?????.dat files (since 0.8)

Definition at line 36 of file blockstorage.h.

◆ DEFAULT_MAX_RAW_TX_FEE_RATE

const CFeeRate node::DEFAULT_MAX_RAW_TX_FEE_RATE {COIN / 10}
static

Maximum fee rate for sendrawtransaction and testmempoolaccept RPC calls.

Also used by the GUI when broadcasting a completed PSBT. By default, a transaction with a fee rate higher than this will be rejected by these RPCs and the GUI. This can be overridden with the maxfeerate argument.

Definition at line 27 of file transaction.h.

◆ DEFAULT_PRINTPRIORITY

const bool node::DEFAULT_PRINTPRIORITY = false
static

Definition at line 27 of file miner.h.

◆ DEFAULT_STOPAFTERBLOCKIMPORT

constexpr bool node::DEFAULT_STOPAFTERBLOCKIMPORT {false}
staticconstexpr

Definition at line 33 of file blockstorage.h.

◆ fHavePruned

bool node::fHavePruned = false

Pruning-related variables and constants.

True if any block files have ever been pruned.

Definition at line 27 of file blockstorage.cpp.

◆ fImporting

std::atomic_bool node::fImporting

◆ fPruneMode

bool node::fPruneMode = false

True if we're running in -prune mode.

Definition at line 28 of file blockstorage.cpp.

◆ fReindex

std::atomic_bool node::fReindex

◆ MAX_BLOCKFILE_SIZE

const unsigned int node::MAX_BLOCKFILE_SIZE = 0x8000000
static

The maximum size of a blk?????.dat file (since 0.8)

Definition at line 40 of file blockstorage.h.

◆ nPruneTarget

uint64_t node::nPruneTarget = 0

Number of MiB of block files that we're trying to stay below.

Definition at line 29 of file blockstorage.cpp.

◆ UNDOFILE_CHUNK_SIZE

const unsigned int node::UNDOFILE_CHUNK_SIZE = 0x100000
static

The pre-allocation chunk size for rev?????.dat files (since 0.8)

Definition at line 38 of file blockstorage.h.