Bitcoin ABC  0.22.13
P2P Digital Currency
Namespaces | Functions | Variables
blockdb.h File Reference
#include <flatfile.h>
Include dependency graph for blockdb.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

 Consensus
 

Functions

FlatFileSeq BlockFileSeq ()
 
FlatFileSeq UndoFileSeq ()
 
FILE * OpenUndoFile (const FlatFilePos &pos, bool fReadOnly=false)
 Open an undo file (rev?????.dat) More...
 
fs::path GetBlockPosFilename (const FlatFilePos &pos)
 Translation to a filesystem path. More...
 
FILE * OpenBlockFile (const FlatFilePos &pos, bool fReadOnly=false)
 Open a block file (blk?????.dat). More...
 
bool ReadBlockFromDisk (CBlock &block, const FlatFilePos &pos, const Consensus::Params &params)
 Functions for disk access for blocks. More...
 
bool ReadBlockFromDisk (CBlock &block, const CBlockIndex *pindex, const Consensus::Params &params)
 

Variables

static constexpr 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...
 

Function Documentation

◆ BlockFileSeq()

FlatFileSeq BlockFileSeq ( )

Definition at line 12 of file blockdb.cpp.

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

◆ GetBlockPosFilename()

fs::path GetBlockPosFilename ( const FlatFilePos pos)

Translation to a filesystem path.

Definition at line 29 of file blockdb.cpp.

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

◆ OpenBlockFile()

FILE* OpenBlockFile ( const FlatFilePos pos,
bool  fReadOnly = false 
)

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

Definition at line 20 of file blockdb.cpp.

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

◆ OpenUndoFile()

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

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

Definition at line 25 of file blockdb.cpp.

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

◆ ReadBlockFromDisk() [1/2]

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

Functions for disk access for blocks.

Definition at line 33 of file blockdb.cpp.

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

◆ ReadBlockFromDisk() [2/2]

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

Definition at line 61 of file blockdb.cpp.

Here is the call graph for this function:

◆ UndoFileSeq()

FlatFileSeq UndoFileSeq ( )

Definition at line 16 of file blockdb.cpp.

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

Variable Documentation

◆ BLOCKFILE_CHUNK_SIZE

constexpr unsigned int BLOCKFILE_CHUNK_SIZE = 0x1000000
static

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

Definition at line 18 of file blockdb.h.

◆ UNDOFILE_CHUNK_SIZE

const unsigned int UNDOFILE_CHUNK_SIZE = 0x100000
static

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

Definition at line 20 of file blockdb.h.