Bitcoin Core 29.99.0
P2P Digital Currency
Functions | Variables
txgraph_tests.cpp File Reference
#include <txgraph.h>
#include <random.h>
#include <boost/test/unit_test.hpp>
#include <memory>
#include <vector>
Include dependency graph for txgraph_tests.cpp:

Go to the source code of this file.

Functions

 BOOST_AUTO_TEST_CASE (txgraph_trim_zigzag)
 
 BOOST_AUTO_TEST_CASE (txgraph_trim_flower)
 
 BOOST_AUTO_TEST_CASE (txgraph_trim_huge)
 
 BOOST_AUTO_TEST_CASE (txgraph_trim_big_singletons)
 

Variables

static constexpr uint64_t NUM_ACCEPTABLE_ITERS = 100'000'000
 The number used as acceptable_iters argument in these tests. More...
 

Function Documentation

◆ BOOST_AUTO_TEST_CASE() [1/4]

BOOST_AUTO_TEST_CASE ( txgraph_trim_big_singletons  )

Definition at line 255 of file txgraph_tests.cpp.

Here is the call graph for this function:

◆ BOOST_AUTO_TEST_CASE() [2/4]

BOOST_AUTO_TEST_CASE ( txgraph_trim_flower  )

The maximum cluster count used in this test.

The number of "top" transactions, which come from disconnected blocks. These are re-added to the mempool and, connecting them to the already-in-mempool transactions, we discover the resulting cluster is oversized.

The total number of transactions in this test.

Set a very large cluster size limit so that only the count limit is triggered.

Definition at line 83 of file txgraph_tests.cpp.

Here is the call graph for this function:

◆ BOOST_AUTO_TEST_CASE() [3/4]

BOOST_AUTO_TEST_CASE ( txgraph_trim_huge  )

The maximum cluster count used in this test.

The number of "top" (from-block) chains of transactions.

The number of transactions per top chain.

The (maximum) number of dependencies per bottom transaction.

The number of bottom transactions that are expected to be created.

The total number of transactions created in this test.

Set a very large cluster size limit so that only the count limit is triggered.

Refs to all top transactions.

Refs to all bottom transactions.

Indexes into top_refs for some transaction of each component, in arbitrary order. Initially these are the last transactions in each chains, but as bottom transactions are added, entries will be removed when they get merged, and randomized.

Definition at line 142 of file txgraph_tests.cpp.

Here is the call graph for this function:

◆ BOOST_AUTO_TEST_CASE() [4/4]

BOOST_AUTO_TEST_CASE ( txgraph_trim_zigzag  )

The maximum cluster count used in this test.

The number of "bottom" transactions, which are in the mempool already.

The number of "top" transactions, which come from disconnected blocks. These are re-added to the mempool and, while connecting them to the already-in-mempool transactions, we discover the resulting cluster is oversized.

The total number of transactions in the test.

Set a very large cluster size limit so that only the count limit is triggered.

Definition at line 20 of file txgraph_tests.cpp.

Here is the call graph for this function:

Variable Documentation

◆ NUM_ACCEPTABLE_ITERS

constexpr uint64_t NUM_ACCEPTABLE_ITERS = 100'000'000
staticconstexpr

The number used as acceptable_iters argument in these tests.

High enough that everything should be optimal, always.

Definition at line 18 of file txgraph_tests.cpp.