MCPcopy Create free account
hub / github.com/ElementsProject/elements / GetSelectionAmount

Method GetSelectionAmount

src/wallet/coinselection.cpp:485–493  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

483}
484
485CAmount OutputGroup::GetSelectionAmount() const
486{
487 // ELEMENTS: non-policy assets always use `m_value`. Their (negative)
488 // `effective_value` will be added to the target for the policy asset
489 if (!m_outputs.empty() && m_outputs[0].asset != ::policyAsset) {
490 return m_value;
491 }
492 return m_subtract_fee_outputs ? m_value : effective_value;
493}
494
495CAmount GetSelectionWaste(const std::set<CInputCoin>& inputs, CAmount change_cost, CAmount target, bool use_effective_value)
496{

Callers 6

operator()Function · 0.80
SelectCoinsBnBFunction · 0.80
SelectCoinsSRDFunction · 0.80
ApproximateBestSubsetFunction · 0.80
KnapsackSolverFunction · 0.80
GroupOutputsFunction · 0.80

Calls 1

emptyMethod · 0.45

Tested by

no test coverage detected