Bitcoin Core 28.99.0
P2P Digital Currency
Classes | Functions | Variables
mempool_tests.cpp File Reference
#include <common/system.h>
#include <policy/policy.h>
#include <test/util/txmempool.h>
#include <txmempool.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.

Classes

class  MemPoolTest
 

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)
 
 BOOST_AUTO_TEST_CASE (MempoolAncestryTestsDiamond)
 

Variables

static constexpr auto REMOVAL_REASON_DUMMY = MemPoolRemovalReason::REPLACED
 

Function Documentation

◆ BOOST_AUTO_TEST_CASE() [1/6]

BOOST_AUTO_TEST_CASE ( MempoolAncestorIndexingTest  )

Definition at line 305 of file mempool_tests.cpp.

Here is the call graph for this function:

◆ BOOST_AUTO_TEST_CASE() [2/6]

BOOST_AUTO_TEST_CASE ( MempoolAncestryTests  )

Definition at line 603 of file mempool_tests.cpp.

Here is the call graph for this function:

◆ BOOST_AUTO_TEST_CASE() [3/6]

BOOST_AUTO_TEST_CASE ( MempoolAncestryTestsDiamond  )

Definition at line 762 of file mempool_tests.cpp.

Here is the call graph for this function:

◆ BOOST_AUTO_TEST_CASE() [4/6]

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 129 of file mempool_tests.cpp.

Here is the call graph for this function:

◆ BOOST_AUTO_TEST_CASE() [5/6]

BOOST_AUTO_TEST_CASE ( MempoolRemoveTest  )

Definition at line 26 of file mempool_tests.cpp.

Here is the call graph for this function:

◆ BOOST_AUTO_TEST_CASE() [6/6]

BOOST_AUTO_TEST_CASE ( MempoolSizeLimitTest  )

Definition at line 434 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 119 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 586 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 18 of file mempool_tests.cpp.