Bitcoin Core 28.99.0
P2P Digital Currency
Functions | Variables
miniminer_tests.cpp File Reference
#include <node/mini_miner.h>
#include <random.h>
#include <txmempool.h>
#include <util/time.h>
#include <test/util/setup_common.h>
#include <test/util/txmempool.h>
#include <boost/test/unit_test.hpp>
#include <optional>
#include <vector>
Include dependency graph for miniminer_tests.cpp:

Go to the source code of this file.

Functions

static CTransactionRef make_tx (const std::vector< COutPoint > &inputs, size_t num_outputs)
 
static bool sanity_check (const std::vector< CTransactionRef > &transactions, const std::map< COutPoint, CAmount > &bumpfees)
 
template<typename Key , typename Value >
Value Find (const std::map< Key, Value > &map, const Key &key)
 
 BOOST_FIXTURE_TEST_CASE (miniminer_negative, TestChain100Setup)
 
 BOOST_FIXTURE_TEST_CASE (miniminer_1p1c, TestChain100Setup)
 
 BOOST_FIXTURE_TEST_CASE (miniminer_overlap, TestChain100Setup)
 
 BOOST_FIXTURE_TEST_CASE (calculate_cluster, TestChain100Setup)
 
 BOOST_FIXTURE_TEST_CASE (manual_ctor, TestChain100Setup)
 

Variables

const CAmount low_fee {CENT/2000}
 
const CAmount med_fee {CENT/200}
 
const CAmount high_fee {CENT/10}
 

Function Documentation

◆ BOOST_FIXTURE_TEST_CASE() [1/5]

BOOST_FIXTURE_TEST_CASE ( calculate_cluster  ,
TestChain100Setup   
)

Definition at line 588 of file miniminer_tests.cpp.

Here is the call graph for this function:

◆ BOOST_FIXTURE_TEST_CASE() [2/5]

BOOST_FIXTURE_TEST_CASE ( manual_ctor  ,
TestChain100Setup   
)

Definition at line 652 of file miniminer_tests.cpp.

Here is the call graph for this function:

◆ BOOST_FIXTURE_TEST_CASE() [3/5]

BOOST_FIXTURE_TEST_CASE ( miniminer_1p1c  ,
TestChain100Setup   
)

Definition at line 109 of file miniminer_tests.cpp.

Here is the call graph for this function:

◆ BOOST_FIXTURE_TEST_CASE() [4/5]

BOOST_FIXTURE_TEST_CASE ( miniminer_negative  ,
TestChain100Setup   
)

Definition at line 75 of file miniminer_tests.cpp.

Here is the call graph for this function:

◆ BOOST_FIXTURE_TEST_CASE() [5/5]

BOOST_FIXTURE_TEST_CASE ( miniminer_overlap  ,
TestChain100Setup   
)

Definition at line 373 of file miniminer_tests.cpp.

Here is the call graph for this function:

◆ Find()

template<typename Key , typename Value >
Value Find ( const std::map< Key, Value > &  map,
const Key &  key 
)

Definition at line 68 of file miniminer_tests.cpp.

Here is the caller graph for this function:

◆ make_tx()

static CTransactionRef make_tx ( const std::vector< COutPoint > &  inputs,
size_t  num_outputs 
)
inlinestatic

Definition at line 23 of file miniminer_tests.cpp.

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

◆ sanity_check()

static bool sanity_check ( const std::vector< CTransactionRef > &  transactions,
const std::map< COutPoint, CAmount > &  bumpfees 
)
inlinestatic

Definition at line 40 of file miniminer_tests.cpp.

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

Variable Documentation

◆ high_fee

const CAmount high_fee {CENT/10}

Definition at line 20 of file miniminer_tests.cpp.

◆ low_fee

const CAmount low_fee {CENT/2000}

Definition at line 18 of file miniminer_tests.cpp.

◆ med_fee

const CAmount med_fee {CENT/200}

Definition at line 19 of file miniminer_tests.cpp.