![]() |
Bitcoin Core
25.99.0
P2P Digital Currency
|
Classes | |
struct | BlockManagerOpts |
An options struct for BlockManager , more ergonomically referred to as BlockManager::Options due to the using-declaration in BlockManager . More... | |
struct | ChainstateManagerOpts |
An options struct for ChainstateManager , more ergonomically referred to as ChainstateManager::Options due to the using-declaration in ChainstateManager . More... | |
struct | CCoinsStats |
struct | Context |
Context struct holding the kernel library's logically global state, and passed to external libbitcoin_kernel functions which need access to this state. More... | |
struct | MemPoolLimits |
Options struct containing limit options for a CTxMemPool. More... | |
struct | MemPoolOptions |
Options struct containing options for constructing a CTxMemPool. More... | |
struct | ImportMempoolOptions |
struct | Interrupted |
Result type for use with std::variant to indicate that an operation should be interrupted. More... | |
class | Notifications |
A base class defining functions for notifying about certain kernel events. More... | |
struct | ValidationCacheSizes |
class | BlockTreeDB |
Access to the block database (blocks/index/) More... | |
Typedefs | |
using | InterruptResult = std::variant< std::monostate, Interrupted > |
Simple result type for functions that need to propagate an interrupt status and don't have other return values. More... | |
Enumerations | |
enum class | CoinStatsHashType { HASH_SERIALIZED , MUHASH , NONE } |
Functions | |
interfaces::BlockInfo | MakeBlockInfo (const CBlockIndex *block_index, const CBlock *data=nullptr) |
Return data from block index. More... | |
util::Result< void > | SanityChecks (const Context &) |
Ensure a usable environment with all necessary library support. More... | |
uint64_t | GetBogoSize (const CScript &script_pub_key) |
DataStream | TxOutSer (const COutPoint &outpoint, const Coin &coin) |
static void | ApplyHash (HashWriter &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 | ComputeUTXOStats (CCoinsView *view, CCoinsStats &stats, T hash_obj, const std::function< void()> &interruption_point) |
Calculate statistics about the unspent transaction output set. More... | |
std::optional< CCoinsStats > | ComputeUTXOStats (CoinStatsHashType hash_type, CCoinsView *view, node::BlockManager &blockman, const std::function< void()> &interruption_point) |
static void | PrepareHash (HashWriter &ss, const CCoinsStats &stats) |
static void | PrepareHash (MuHash3072 &muhash, CCoinsStats &stats) |
static void | PrepareHash (std::nullptr_t, CCoinsStats &stats) |
static void | FinalizeHash (HashWriter &ss, CCoinsStats &stats) |
static void | FinalizeHash (MuHash3072 &muhash, CCoinsStats &stats) |
static void | FinalizeHash (std::nullptr_t, CCoinsStats &stats) |
bool | LoadMempool (CTxMemPool &pool, const fs::path &load_path, Chainstate &active_chainstate, ImportMempoolOptions &&opts) |
Import the file and attempt to add its contents to the mempool. More... | |
bool | DumpMempool (const CTxMemPool &pool, const fs::path &dump_path, FopenFn mockable_fopen_function, bool skip_file_commit) |
bool | DumpMempool (const CTxMemPool &pool, const fs::path &dump_path, fsbridge::FopenFn mockable_fopen_function=fsbridge::fopen, bool skip_file_commit=false) |
Dump the mempool to a file. More... | |
template<typename T > | |
bool | IsInterrupted (const T &result) |
Variables | |
Context * | g_context |
Global pointer to kernel::Context for legacy code. More... | |
static const uint64_t | MEMPOOL_DUMP_VERSION = 1 |
static constexpr uint8_t | DB_BLOCK_FILES {'f'} |
static constexpr uint8_t | DB_BLOCK_INDEX {'b'} |
static constexpr uint8_t | DB_FLAG {'F'} |
static constexpr uint8_t | DB_REINDEX_FLAG {'R'} |
static constexpr uint8_t | DB_LAST_BLOCK {'l'} |
using kernel::InterruptResult = typedef std::variant<std::monostate, Interrupted> |
Simple result type for functions that need to propagate an interrupt status and don't have other return values.
Definition at line 23 of file notifications_interface.h.
|
strong |
Enumerator | |
---|---|
HASH_SERIALIZED | |
MUHASH | |
NONE |
Definition at line 25 of file coinstats.h.
|
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 72 of file coinstats.cpp.
|
static |
|
static |
Definition at line 90 of file coinstats.cpp.
|
static |
Definition at line 101 of file coinstats.cpp.
|
static |
Calculate statistics about the unspent transaction output set.
Definition at line 116 of file coinstats.cpp.
std::optional< CCoinsStats > kernel::ComputeUTXOStats | ( | CoinStatsHashType | hash_type, |
CCoinsView * | view, | ||
node::BlockManager & | blockman, | ||
const std::function< void()> & | interruption_point | ||
) |
bool kernel::DumpMempool | ( | const CTxMemPool & | pool, |
const fs::path & | dump_path, | ||
FopenFn | mockable_fopen_function, | ||
bool | skip_file_commit | ||
) |
Definition at line 132 of file mempool_persist.cpp.
bool kernel::DumpMempool | ( | const CTxMemPool & | pool, |
const fs::path & | dump_path, | ||
fsbridge::FopenFn | mockable_fopen_function = fsbridge::fopen , |
||
bool | skip_file_commit = false |
||
) |
Dump the mempool to a file.
|
static |
Definition at line 192 of file coinstats.cpp.
|
static |
|
static |
Definition at line 202 of file coinstats.cpp.
uint64_t kernel::GetBogoSize | ( | const CScript & | script_pub_key | ) |
Definition at line 41 of file coinstats.cpp.
bool kernel::IsInterrupted | ( | const T & | result | ) |
Definition at line 26 of file notifications_interface.h.
bool kernel::LoadMempool | ( | CTxMemPool & | pool, |
const fs::path & | load_path, | ||
Chainstate & | active_chainstate, | ||
ImportMempoolOptions && | opts | ||
) |
Import the file and attempt to add its contents to the mempool.
Definition at line 39 of file mempool_persist.cpp.
interfaces::BlockInfo kernel::MakeBlockInfo | ( | const CBlockIndex * | index, |
const CBlock * | data | ||
) |
|
static |
|
static |
Definition at line 189 of file coinstats.cpp.
|
static |
Definition at line 190 of file coinstats.cpp.
util::Result< void > kernel::SanityChecks | ( | const Context & | ) |
Ensure a usable environment with all necessary library support.
Definition at line 16 of file checks.cpp.
DataStream kernel::TxOutSer | ( | const COutPoint & | outpoint, |
const Coin & | coin | ||
) |
|
staticconstexpr |
Definition at line 33 of file blockstorage.cpp.
|
staticconstexpr |
Definition at line 34 of file blockstorage.cpp.
|
staticconstexpr |
Definition at line 35 of file blockstorage.cpp.
|
staticconstexpr |
Definition at line 37 of file blockstorage.cpp.
|
staticconstexpr |
Definition at line 36 of file blockstorage.cpp.
Context * kernel::g_context |
Global pointer to kernel::Context for legacy code.
New code should avoid using this, and require state it needs to be passed to it directly.
Having this pointer is useful because it allows state be moved out of global variables into the kernel::Context struct before all global references to that state are removed. This allows the global references to be removed incrementally, instead of all at once.
Definition at line 17 of file context.cpp.
|
static |
Definition at line 37 of file mempool_persist.cpp.