![]() |
Bitcoin Core 31.1.0
P2P Digital Currency
|
#include <wallet/coinselection.h>#include <common/system.h>#include <consensus/amount.h>#include <consensus/consensus.h>#include <interfaces/chain.h>#include <logging.h>#include <policy/feerate.h>#include <util/check.h>#include <util/moneystr.h>#include <numeric>#include <optional>#include <queue>Go to the source code of this file.
Classes | |
| class | wallet::MinOutputGroupComparator |
Namespaces | |
| namespace | wallet |
Functions | |
| static util::Result< SelectionResult > | wallet::ErrorMaxWeightExceeded () |
| util::Result< SelectionResult > | wallet::SelectCoinsBnB (std::vector< OutputGroup > &utxo_pool, const CAmount &selection_target, const CAmount &cost_of_change, int max_selection_weight) |
| util::Result< SelectionResult > | wallet::CoinGrinder (std::vector< OutputGroup > &utxo_pool, const CAmount &selection_target, CAmount change_target, int max_selection_weight) |
| util::Result< SelectionResult > | wallet::SelectCoinsSRD (const std::vector< OutputGroup > &utxo_pool, CAmount target_value, CAmount change_fee, FastRandomContext &rng, int max_selection_weight) |
| Select coins by Single Random Draw (SRD). | |
| static void | wallet::ApproximateBestSubset (FastRandomContext &insecure_rand, const std::vector< OutputGroup > &groups, const CAmount &nTotalLower, const CAmount &nTargetValue, std::vector< char > &vfBest, CAmount &nBest, int max_selection_weight, int iterations=1000) |
| Find a subset of the OutputGroups that is at least as large as, but as close as possible to, the target amount; solve subset sum. | |
| util::Result< SelectionResult > | wallet::KnapsackSolver (std::vector< OutputGroup > &groups, const CAmount &nTargetValue, CAmount change_target, FastRandomContext &rng, int max_selection_weight) |
| CAmount | wallet::GenerateChangeTarget (CAmount payment_value, CAmount change_fee, FastRandomContext &rng) |
| Choose a random change target for each transaction to make it harder to fingerprint the Core wallet based on the change output values of transactions it creates. | |
| std::string | wallet::GetAlgorithmName (const SelectionAlgorithm algo) |
Variables | |
| struct { | |
| } | wallet::descending |
| struct { | |
| } | wallet::descending_effval_weight |
| static const size_t | wallet::TOTAL_TRIES = 100000 |