Bitcoin Core 28.99.0
P2P Digital Currency
Functions | Variables
txvalidation_tests.cpp File Reference
#include <consensus/validation.h>
#include <key_io.h>
#include <policy/packages.h>
#include <policy/policy.h>
#include <policy/ephemeral_policy.h>
#include <policy/truc_policy.h>
#include <primitives/transaction.h>
#include <random.h>
#include <script/script.h>
#include <test/util/setup_common.h>
#include <test/util/txmempool.h>
#include <validation.h>
#include <boost/test/unit_test.hpp>
Include dependency graph for txvalidation_tests.cpp:

Go to the source code of this file.

Functions

 BOOST_FIXTURE_TEST_CASE (tx_mempool_reject_coinbase, TestChain100Setup)
 Ensure that the mempool won't accept coinbase transactions. More...
 
static std::vector< COutPointrandom_outpoints (size_t num_outpoints)
 
static std::vector< CPubKeyrandom_keys (size_t num_keys)
 
static CTransactionRef make_tx (const std::vector< COutPoint > &inputs, int32_t version)
 
static CTransactionRef make_ephemeral_tx (const std::vector< COutPoint > &inputs, int32_t version)
 
 BOOST_FIXTURE_TEST_CASE (ephemeral_tests, RegTestingSetup)
 
 BOOST_FIXTURE_TEST_CASE (version3_tests, RegTestingSetup)
 

Variables

static constexpr auto NUM_EPHEMERAL_TX_OUTPUTS = 3
 
static constexpr auto EPHEMERAL_DUST_INDEX = NUM_EPHEMERAL_TX_OUTPUTS - 1
 

Function Documentation

◆ BOOST_FIXTURE_TEST_CASE() [1/3]

BOOST_FIXTURE_TEST_CASE ( ephemeral_tests  ,
RegTestingSetup   
)

Definition at line 113 of file txvalidation_tests.cpp.

Here is the call graph for this function:

◆ BOOST_FIXTURE_TEST_CASE() [2/3]

BOOST_FIXTURE_TEST_CASE ( tx_mempool_reject_coinbase  ,
TestChain100Setup   
)

Ensure that the mempool won't accept coinbase transactions.

Definition at line 26 of file txvalidation_tests.cpp.

Here is the call graph for this function:

◆ BOOST_FIXTURE_TEST_CASE() [3/3]

BOOST_FIXTURE_TEST_CASE ( version3_tests  ,
RegTestingSetup   
)

Definition at line 275 of file txvalidation_tests.cpp.

Here is the call graph for this function:

◆ make_ephemeral_tx()

static CTransactionRef make_ephemeral_tx ( const std::vector< COutPoint > &  inputs,
int32_t  version 
)
inlinestatic

Definition at line 97 of file txvalidation_tests.cpp.

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

◆ make_tx()

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

Definition at line 77 of file txvalidation_tests.cpp.

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

◆ random_keys()

static std::vector< CPubKey > random_keys ( size_t  num_keys)
inlinestatic

Definition at line 65 of file txvalidation_tests.cpp.

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

◆ random_outpoints()

static std::vector< COutPoint > random_outpoints ( size_t  num_outpoints)
inlinestatic

Definition at line 57 of file txvalidation_tests.cpp.

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

Variable Documentation

◆ EPHEMERAL_DUST_INDEX

constexpr auto EPHEMERAL_DUST_INDEX = NUM_EPHEMERAL_TX_OUTPUTS - 1
staticconstexpr

Definition at line 94 of file txvalidation_tests.cpp.

◆ NUM_EPHEMERAL_TX_OUTPUTS

constexpr auto NUM_EPHEMERAL_TX_OUTPUTS = 3
staticconstexpr

Definition at line 93 of file txvalidation_tests.cpp.