MCPcopy Create free account
hub / github.com/bitcoin/bitcoin / Push

Method Push

src/wallet/coinselection.cpp:868–881  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

866}
867
868void OutputGroupTypeMap::Push(const OutputGroup& group, OutputType type, bool insert_positive, bool insert_mixed)
869{
870 if (group.m_outputs.empty()) return;
871
872 Groups& groups = groups_by_type[type];
873 if (insert_positive && group.GetSelectionAmount() > 0) {
874 groups.positive_group.emplace_back(group);
875 all_groups.positive_group.emplace_back(group);
876 }
877 if (insert_mixed) {
878 groups.mixed_group.emplace_back(group);
879 all_groups.mixed_group.emplace_back(group);
880 }
881}
882
883CAmount GenerateChangeTarget(const CAmount payment_value, const CAmount change_fee, FastRandomContext& rng)
884{

Callers 1

GroupOutputsFunction · 0.45

Calls 3

GetSelectionAmountMethod · 0.80
emptyMethod · 0.45
emplace_backMethod · 0.45

Tested by

no test coverage detected