Bitcoin Core  22.99.0
P2P Digital Currency
Functions | Variables
mempool_tests.cpp File Reference
#include <policy/policy.h>
#include <txmempool.h>
#include <util/system.h>
#include <util/time.h>
#include <test/util/setup_common.h>
#include <boost/test/unit_test.hpp>
#include <vector>
Include dependency graph for mempool_tests.cpp:

Go to the source code of this file.

Functions

 BOOST_AUTO_TEST_CASE (MempoolRemoveTest)
 
template<typename name >
static void CheckSort (CTxMemPool &pool, std::vector< std::string > &sortedOrder) EXCLUSIVE_LOCKS_REQUIRED(pool.cs)
 
 BOOST_AUTO_TEST_CASE (MempoolIndexingTest)
 
 BOOST_AUTO_TEST_CASE (MempoolAncestorIndexingTest)
 
 BOOST_AUTO_TEST_CASE (MempoolSizeLimitTest)
 
CTransactionRef make_tx (std::vector< CAmount > &&output_values, std::vector< CTransactionRef > &&inputs=std::vector< CTransactionRef >(), std::vector< uint32_t > &&input_indices=std::vector< uint32_t >())
 
 BOOST_AUTO_TEST_CASE (MempoolAncestryTests)
 

Variables

static constexpr auto REMOVAL_REASON_DUMMY = MemPoolRemovalReason::REPLACED
 

Function Documentation

◆ BOOST_AUTO_TEST_CASE() [1/5]

BOOST_AUTO_TEST_CASE ( MempoolAncestorIndexingTest  )

Definition at line 295 of file mempool_tests.cpp.

Here is the call graph for this function:

◆ BOOST_AUTO_TEST_CASE() [2/5]

BOOST_AUTO_TEST_CASE ( MempoolAncestryTests  )

Definition at line 593 of file mempool_tests.cpp.

Here is the call graph for this function:

◆ BOOST_AUTO_TEST_CASE() [3/5]

BOOST_AUTO_TEST_CASE ( MempoolIndexingTest  )

tx8 and tx9 should both now be sorted higher Final order after tx10 is added:

tx3 = 0 (1) tx5 = 10000 (1) tx1 = 10000 (1) tx4 = 15000 (1) tx2 = 20000 (1) tx9 = 200k (2 txs) tx8 = 200k (2 txs) tx10 = 200k (1 tx) tx6 = 2.2M (5 txs) tx7 = 2.2M (4 txs)

Definition at line 122 of file mempool_tests.cpp.

Here is the call graph for this function:

◆ BOOST_AUTO_TEST_CASE() [4/5]

BOOST_AUTO_TEST_CASE ( MempoolRemoveTest  )

Definition at line 19 of file mempool_tests.cpp.

Here is the call graph for this function:

◆ BOOST_AUTO_TEST_CASE() [5/5]

BOOST_AUTO_TEST_CASE ( MempoolSizeLimitTest  )

Definition at line 424 of file mempool_tests.cpp.

Here is the call graph for this function:

◆ CheckSort()

template<typename name >
static void CheckSort ( CTxMemPool pool,
std::vector< std::string > &  sortedOrder 
)
static

Definition at line 112 of file mempool_tests.cpp.

◆ make_tx()

CTransactionRef make_tx ( std::vector< CAmount > &&  output_values,
std::vector< CTransactionRef > &&  inputs = std::vector<CTransactionRef>(),
std::vector< uint32_t > &&  input_indices = std::vector<uint32_t>() 
)
inline

Definition at line 576 of file mempool_tests.cpp.

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

Variable Documentation

◆ REMOVAL_REASON_DUMMY

constexpr auto REMOVAL_REASON_DUMMY = MemPoolRemovalReason::REPLACED
staticconstexpr

Definition at line 17 of file mempool_tests.cpp.