Bitcoin Core  24.99.0
P2P Digital Currency
Classes | Namespaces | Functions | Variables
utxo_snapshot.h File Reference
#include <fs.h>
#include <uint256.h>
#include <serialize.h>
#include <validation.h>
#include <optional>
Include dependency graph for utxo_snapshot.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  node::SnapshotMetadata
 Metadata describing a serialized version of a UTXO set from which an assumeutxo Chainstate can be constructed. More...
 

Namespaces

 node
 

Functions

std::optional< fs::pathnode::FindSnapshotChainstateDir ()
 Return a path to the snapshot-based chainstate dir, if one exists. More...
 

Variables

RecursiveMutex cs_main
 Mutex to guard access to validation specific variables, such as reading or changing the chainstate. More...
 
const fs::path node::SNAPSHOT_BLOCKHASH_FILENAME {"base_blockhash"}
 The file in the snapshot chainstate dir which stores the base blockhash. More...
 
bool WriteSnapshotBaseBlockhash(Chainstate &snapshot_chainstate) EXCLUSIVE_LOCKS_REQUIRED(std::optional< uint256 > constexpr ReadSnapshotBaseBlockhash(fs::path chaindir) EXCLUSIVE_LOCKS_REQUIRED(std::string_view node::SNAPSHOT_CHAINSTATE_SUFFIX = "_snapshot"
 Write out the blockhash of the snapshot base block that was used to construct this chainstate. More...
 

Variable Documentation

◆ cs_main

RecursiveMutex cs_main
extern

Mutex to guard access to validation specific variables, such as reading or changing the chainstate.

This may also need to be locked when updating the transaction pool, e.g. on AcceptToMemoryPool. See CTxMemPool::cs comment for details.

The transaction pool has a separate lock to allow reading from it and the chainstate at the same time.

Definition at line 7 of file cs_main.cpp.