Bitcoin Core 28.99.0
P2P Digital Currency
Functions | Variables
chainstate.h File Reference
#include <clientversion.h>
#include <logging.h>
#include <node/context.h>
#include <node/utxo_snapshot.h>
#include <rpc/blockchain.h>
#include <test/util/setup_common.h>
#include <util/fs.h>
#include <validation.h>
#include <univalue.h>
Include dependency graph for chainstate.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

template<typename F = decltype(NoMalleation)>
static bool CreateAndActivateUTXOSnapshot (TestingSetup *fixture, F malleation=NoMalleation, bool reset_chainstate=false, bool in_memory_chainstate=false)
 Create and activate a UTXO snapshot, optionally providing a function to malleate the snapshot. More...
 

Variables

const auto NoMalleation = [](AutoFile& file, node::SnapshotMetadata& meta){}
 

Function Documentation

◆ CreateAndActivateUTXOSnapshot()

template<typename F = decltype(NoMalleation)>
static bool CreateAndActivateUTXOSnapshot ( TestingSetup fixture,
malleation = NoMalleation,
bool  reset_chainstate = false,
bool  in_memory_chainstate = false 
)
static

Create and activate a UTXO snapshot, optionally providing a function to malleate the snapshot.

If reset_chainstate is true, reset the original chainstate back to the genesis block. This allows us to simulate more realistic conditions in which a snapshot is loaded into an otherwise mostly-uninitialized datadir. It also allows us to test conditions that would otherwise cause shutdowns based on the IBD chainstate going past the snapshot it generated.

Definition at line 33 of file chainstate.h.

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

Variable Documentation

◆ NoMalleation

const auto NoMalleation = [](AutoFile& file, node::SnapshotMetadata& meta){}

Definition at line 19 of file chainstate.h.