![]() |
Bitcoin Core 31.1.0
P2P Digital Currency
|
#include <consensus/amount.h>#include <policy/policy.h>#include <wallet/coinselection.h>#include <wallet/test/wallet_test_fixture.h>#include <boost/test/unit_test.hpp>Go to the source code of this file.
Namespaces | |
| namespace | wallet |
Functions | |
| static CoinSelectionParams | wallet::init_default_params () |
| Default coin selection parameters (dcsp) allow us to only explicitly set parameters when a diverging value is relevant in the context of a test. | |
| static OutputGroup | wallet::MakeCoin (const CAmount &amount, bool is_eff_value=true, CoinSelectionParams cs_params=default_cs_params, int custom_spending_vsize=P2WPKH_INPUT_VSIZE) |
| Make one OutputGroup with a single UTXO that either has a given effective value (default) or a given amount (is_eff_value = false). | |
| static void | wallet::AddCoins (std::vector< OutputGroup > &utxo_pool, std::vector< CAmount > coins, CoinSelectionParams cs_params=default_cs_params) |
| Make multiple OutputGroups with the given values as their effective value. | |
| static void | wallet::AddDuplicateCoins (std::vector< OutputGroup > &utxo_pool, int count, int amount, CoinSelectionParams cs_params=default_cs_params) |
| Make multiple coins that share the same effective value. | |
| static bool | wallet::HaveEquivalentValues (const SelectionResult &a, const SelectionResult &b) |
| Check if SelectionResult a is equivalent to SelectionResult b. | |
| static std::string | wallet::InputAmountsToString (const SelectionResult &selection) |
| static void | wallet::TestBnBSuccess (std::string test_title, std::vector< OutputGroup > &utxo_pool, const CAmount &selection_target, const std::vector< CAmount > &expected_input_amounts, const CoinSelectionParams &cs_params=default_cs_params, const int custom_spending_vsize=P2WPKH_INPUT_VSIZE, const int max_selection_weight=MAX_STANDARD_TX_WEIGHT) |
| static void | wallet::TestBnBFail (std::string test_title, std::vector< OutputGroup > &utxo_pool, const CAmount &selection_target, int max_selection_weight=MAX_STANDARD_TX_WEIGHT, const bool expect_max_weight_exceeded=false) |
| wallet::BOOST_AUTO_TEST_CASE (bnb_test) | |
| wallet::BOOST_AUTO_TEST_CASE (bnb_feerate_sensitivity_test) | |
Variables | |
| static int | wallet::next_lock_time = 0 |
| static FastRandomContext | wallet::default_rand |
| static const int | wallet::P2WPKH_INPUT_VSIZE = 68 |
| static const int | wallet::P2WPKH_OUTPUT_VSIZE = 31 |
| static const CoinSelectionParams | wallet::default_cs_params = init_default_params() |