Bitcoin Core  22.99.0
P2P Digital Currency
Classes | Namespaces | Functions | Variables
blockstorage.cpp File Reference
#include <node/blockstorage.h>
#include <chain.h>
#include <chainparams.h>
#include <clientversion.h>
#include <consensus/validation.h>
#include <flatfile.h>
#include <fs.h>
#include <hash.h>
#include <pow.h>
#include <reverse_iterator.h>
#include <shutdown.h>
#include <signet.h>
#include <streams.h>
#include <undo.h>
#include <util/syscall_sandbox.h>
#include <util/system.h>
#include <validation.h>
Include dependency graph for blockstorage.cpp:

Go to the source code of this file.

Classes

struct  node::CImportingNow
 

Namespaces

 node
 

Functions

std::atomic_bool node::fImporting (false)
 
std::atomic_bool node::fReindex (false)
 
static FILE * node::OpenUndoFile (const FlatFilePos &pos, bool fReadOnly)
 Open an undo file (rev?????.dat) More...
 
static FlatFileSeq node::BlockFileSeq ()
 
static FlatFileSeq node::UndoFileSeq ()
 
bool node::IsBlockPruned (const CBlockIndex *pblockindex)
 Check whether the block associated with this index entry is pruned or not. More...
 
void node::CleanupBlockRevFiles ()
 
static bool node::UndoWriteToDisk (const CBlockUndo &blockundo, FlatFilePos &pos, const uint256 &hashBlock, const CMessageHeader::MessageStartChars &messageStart)
 
bool node::UndoReadFromDisk (CBlockUndo &blockundo, const CBlockIndex *pindex)
 
void node::UnlinkPrunedFiles (const std::set< int > &setFilesToPrune)
 Actually unlink the specified files. More...
 
FILE * node::OpenBlockFile (const FlatFilePos &pos, bool fReadOnly=false)
 Open a block file (blk?????.dat) More...
 
fs::path node::GetBlockPosFilename (const FlatFilePos &pos)
 Translation to a filesystem path. More...
 
static bool node::WriteBlockToDisk (const CBlock &block, FlatFilePos &pos, const CMessageHeader::MessageStartChars &messageStart)
 
bool node::ReadBlockFromDisk (CBlock &block, const FlatFilePos &pos, const Consensus::Params &consensusParams)
 Functions for disk access for blocks. More...
 
bool node::ReadBlockFromDisk (CBlock &block, const CBlockIndex *pindex, const Consensus::Params &consensusParams)
 
bool node::ReadRawBlockFromDisk (std::vector< uint8_t > &block, const FlatFilePos &pos, const CMessageHeader::MessageStartChars &message_start)
 
bool node::ReadRawBlockFromDisk (std::vector< uint8_t > &block, const CBlockIndex *pindex, const CMessageHeader::MessageStartChars &message_start)
 
void node::ThreadImport (ChainstateManager &chainman, std::vector< fs::path > vImportFiles, const ArgsManager &args)
 

Variables

bool node::fHavePruned = false
 Pruning-related variables and constants. More...
 
bool node::fPruneMode = false
 True if we're running in -prune mode. More...
 
uint64_t node::nPruneTarget = 0
 Number of MiB of block files that we're trying to stay below. More...