Bitcoin Core 31.99.0
P2P Digital Currency
Classes | Typedefs | Functions | Variables
baseindex_tests.cpp File Reference
#include <addresstype.h>
#include <blockfilter.h>
#include <chain.h>
#include <chainparams.h>
#include <coins.h>
#include <common/args.h>
#include <consensus/validation.h>
#include <index/base.h>
#include <index/blockfilterindex.h>
#include <index/coinstatsindex.h>
#include <index/txindex.h>
#include <index/txospenderindex.h>
#include <interfaces/chain.h>
#include <kernel/types.h>
#include <key.h>
#include <node/context.h>
#include <primitives/block.h>
#include <script/script.h>
#include <sync.h>
#include <test/util/mining.h>
#include <test/util/setup_common.h>
#include <test/util/time.h>
#include <test/util/validation.h>
#include <tinyformat.h>
#include <util/byte_units.h>
#include <util/check.h>
#include <util/fs.h>
#include <validation.h>
#include <boost/test/unit_test.hpp>
#include <chrono>
#include <functional>
#include <future>
#include <memory>
#include <string>
#include <thread>
#include <utility>
#include <vector>
Include dependency graph for baseindex_tests.cpp:

Go to the source code of this file.

Classes

class  IndexReorgCrash
 

Typedefs

using IndexFactory = std::function< std::unique_ptr< BaseIndex >(node::NodeContext &)>
 

Functions

 BOOST_FIXTURE_TEST_CASE (baseindex_no_commit_ahead_of_flush, TestChain100Setup)
 
 BOOST_FIXTURE_TEST_CASE (index_unclean_shutdown, TestChain100Setup)
 
 BOOST_FIXTURE_TEST_CASE (index_reorg_crash, TestChain100Setup)
 

Variables

static const std::vector< std::pair< std::string, IndexFactory > > INDEX_FACTORIES
 

Typedef Documentation

◆ IndexFactory

using IndexFactory = std::function<std::unique_ptr<BaseIndex>(node::NodeContext&)>

Definition at line 47 of file baseindex_tests.cpp.

Function Documentation

◆ BOOST_FIXTURE_TEST_CASE() [1/3]

BOOST_FIXTURE_TEST_CASE ( baseindex_no_commit_ahead_of_flush  ,
TestChain100Setup   
)

Definition at line 68 of file baseindex_tests.cpp.

Here is the call graph for this function:

◆ BOOST_FIXTURE_TEST_CASE() [2/3]

BOOST_FIXTURE_TEST_CASE ( index_reorg_crash  ,
TestChain100Setup   
)

Definition at line 193 of file baseindex_tests.cpp.

Here is the call graph for this function:

◆ BOOST_FIXTURE_TEST_CASE() [3/3]

BOOST_FIXTURE_TEST_CASE ( index_unclean_shutdown  ,
TestChain100Setup   
)

Definition at line 112 of file baseindex_tests.cpp.

Here is the call graph for this function:

Variable Documentation

◆ INDEX_FACTORIES

const std::vector<std::pair<std::string, IndexFactory> > INDEX_FACTORIES
static
Initial value:
{
{"coinstatsindex", [](node::NodeContext& node) -> std::unique_ptr<BaseIndex> {
return std::make_unique<CoinStatsIndex>(interfaces::MakeChain(node), 1_MiB); }},
{"txindex", [](node::NodeContext& node) -> std::unique_ptr<BaseIndex> {
return std::make_unique<TxIndex>(interfaces::MakeChain(node), 1_MiB); }},
{"txospenderindex", [](node::NodeContext& node) -> std::unique_ptr<BaseIndex> {
return std::make_unique<TxoSpenderIndex>(interfaces::MakeChain(node), 1_MiB); }},
{"blockfilterindex", [](node::NodeContext& node) -> std::unique_ptr<BaseIndex> {
return std::make_unique<BlockFilterIndex>(interfaces::MakeChain(node), BlockFilterType::BASIC, 1_MiB); }},
}
std::unique_ptr< Chain > MakeChain(node::NodeContext &node)
Return implementation of Chain interface.
Definition: messages.h:21
NodeContext struct containing references to chain state and connection state.
Definition: context.h:59

Definition at line 49 of file baseindex_tests.cpp.