Bitcoin Core 31.0.0
P2P Digital Currency
Loading...
Searching...
No Matches
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/common.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.
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 114 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 27 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()

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

Definition at line 98 of file txvalidation_tests.cpp.

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

◆ make_tx()

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

Definition at line 78 of file txvalidation_tests.cpp.

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

◆ random_keys()

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

Definition at line 66 of file txvalidation_tests.cpp.

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

◆ random_outpoints()

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

Definition at line 58 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

auto EPHEMERAL_DUST_INDEX = NUM_EPHEMERAL_TX_OUTPUTS - 1
staticconstexpr

Definition at line 95 of file txvalidation_tests.cpp.

◆ NUM_EPHEMERAL_TX_OUTPUTS

auto NUM_EPHEMERAL_TX_OUTPUTS = 3
staticconstexpr

Definition at line 94 of file txvalidation_tests.cpp.