Bitcoin Core  22.99.0
P2P Digital Currency
Namespaces | Macros | Typedefs | Functions | Variables
coinselector_tests.cpp File Reference
#include <consensus/amount.h>
#include <node/context.h>
#include <primitives/transaction.h>
#include <random.h>
#include <test/util/setup_common.h>
#include <util/translation.h>
#include <wallet/coincontrol.h>
#include <wallet/coinselection.h>
#include <wallet/spend.h>
#include <wallet/test/wallet_test_fixture.h>
#include <wallet/wallet.h>
#include <algorithm>
#include <boost/test/unit_test.hpp>
#include <random>
Include dependency graph for coinselector_tests.cpp:

Go to the source code of this file.

Namespaces

 wallet
 

Macros

#define RUN_TESTS   100
 
#define RANDOM_REPEATS   5
 

Typedefs

typedef std::set< CInputCoin > wallet::CoinSet
 

Functions

static void wallet::add_coin (const CAmount &nValue, int nInput, std::vector< CInputCoin > &set)
 
static void wallet::add_coin (const CAmount &nValue, int nInput, SelectionResult &result)
 
static void wallet::add_coin (const CAmount &nValue, int nInput, CoinSet &set, CAmount fee=0, CAmount long_term_fee=0)
 
static void wallet::add_coin (std::vector< COutput > &coins, CWallet &wallet, const CAmount &nValue, int nAge=6 *24, bool fIsFromMe=false, int nInput=0, bool spendable=false)
 
static bool wallet::EquivalentResult (const SelectionResult &a, const SelectionResult &b)
 Check if SelectionResult a is equivalent to SelectionResult b. More...
 
static bool wallet::EqualResult (const SelectionResult &a, const SelectionResult &b)
 Check if this selection is equal to another one. More...
 
static CAmount wallet::make_hard_case (int utxos, std::vector< CInputCoin > &utxo_pool)
 
std::vector< OutputGroup > & wallet::GroupCoins (const std::vector< CInputCoin > &coins)
 
std::vector< OutputGroup > & wallet::GroupCoins (const std::vector< COutput > &coins)
 
std::vector< OutputGroup > & wallet::KnapsackGroupOutputs (const std::vector< COutput > &coins, CWallet &wallet, const CoinEligibilityFilter &filter)
 
 wallet::BOOST_AUTO_TEST_CASE (bnb_search_test)
 
 wallet::BOOST_AUTO_TEST_CASE (knapsack_solver_test)
 
 wallet::BOOST_AUTO_TEST_CASE (ApproximateBestSubset)
 
 wallet::BOOST_AUTO_TEST_CASE (SelectCoins_test)
 
 wallet::BOOST_AUTO_TEST_CASE (waste_test)
 

Variables

static const CoinEligibilityFilter wallet::filter_standard (1, 6, 0)
 
static const CoinEligibilityFilter wallet::filter_confirmed (1, 1, 0)
 
static const CoinEligibilityFilter wallet::filter_standard_extra (6, 6, 0)
 
static int wallet::nextLockTime = 0
 

Macro Definition Documentation

◆ RANDOM_REPEATS

#define RANDOM_REPEATS   5

Definition at line 29 of file coinselector_tests.cpp.

◆ RUN_TESTS

#define RUN_TESTS   100

Definition at line 25 of file coinselector_tests.cpp.