Bitcoin Core 28.99.0
P2P Digital Currency
Classes | Namespaces | Typedefs | Enumerations | Functions | Variables
blockstorage.h File Reference
#include <attributes.h>
#include <chain.h>
#include <dbwrapper.h>
#include <flatfile.h>
#include <kernel/blockmanager_opts.h>
#include <kernel/chainparams.h>
#include <kernel/cs_main.h>
#include <kernel/messagestartchars.h>
#include <primitives/block.h>
#include <streams.h>
#include <sync.h>
#include <uint256.h>
#include <util/fs.h>
#include <util/hasher.h>
#include <array>
#include <atomic>
#include <cstdint>
#include <functional>
#include <limits>
#include <map>
#include <memory>
#include <optional>
#include <set>
#include <span>
#include <string>
#include <unordered_map>
#include <utility>
#include <vector>
Include dependency graph for blockstorage.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  kernel::BlockTreeDB
 Access to the block database (blocks/index/) More...
 
struct  node::CBlockIndexWorkComparator
 
struct  node::CBlockIndexHeightOnlyComparator
 
struct  node::PruneLockInfo
 
struct  node::BlockfileCursor
 
class  node::BlockManager
 Maintains a tree of blocks (stored in m_block_index) which is consulted to determine where the most-work tip is. More...
 

Namespaces

namespace  Consensus
 Transaction validation functions.
 
namespace  util
 
namespace  kernel
 
namespace  node
 

Typedefs

using node::BlockMap = std::unordered_map< uint256, CBlockIndex, BlockHasher >
 

Enumerations

enum  node::BlockfileType { node::NORMAL = 0 , node::ASSUMED = 1 , node::NUM_TYPES = 2 }
 

Functions

std::ostream & node::operator<< (std::ostream &os, const BlockfileType &type)
 
std::ostream & node::operator<< (std::ostream &os, const BlockfileCursor &cursor)
 
void node::ImportBlocks (ChainstateManager &chainman, std::span< const fs::path > import_paths)
 

Variables

static const unsigned int node::BLOCKFILE_CHUNK_SIZE = 0x1000000
 The pre-allocation chunk size for blk?????.dat files (since 0.8) More...
 
static const unsigned int node::UNDOFILE_CHUNK_SIZE = 0x100000
 The pre-allocation chunk size for rev?????.dat files (since 0.8) More...
 
static const unsigned int node::MAX_BLOCKFILE_SIZE = 0x8000000
 The maximum size of a blk?????.dat file (since 0.8) More...
 
static constexpr size_t node::BLOCK_SERIALIZATION_HEADER_SIZE = std::tuple_size_v<MessageStartChars> + sizeof(unsigned int)
 Size of header written by WriteBlockToDisk before a serialized CBlock. More...