Merge f0c4807a6a into merged_master (Bitcoin PR bitcoin/bitcoin#26560)

This commit is contained in:
Tom Trevethan 2025-03-10 00:43:45 +00:00
commit 9d59cc40da
8 changed files with 184 additions and 20 deletions

View file

@ -740,12 +740,16 @@ void SelectionResult::AddInput(const SelectionResult& result) {
void SelectionResult::Merge(const SelectionResult& other)
{
// Obtain the expected selected inputs count after the merge (for now, duplicates are not allowed)
const size_t expected_count = m_selected_inputs.size() + other.m_selected_inputs.size();
m_target += other.m_target;
m_use_effective |= other.m_use_effective;
if (m_algo == SelectionAlgorithm::MANUAL) {
m_algo = other.m_algo;
}
util::insert(m_selected_inputs, other.m_selected_inputs);
assert(m_selected_inputs.size() == expected_count);
}
const std::set<COutput>& SelectionResult::GetInputSet() const