mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-19 13:27:35 +02:00
Merge f0c4807a6a into merged_master (Bitcoin PR bitcoin/bitcoin#26560)
This commit is contained in:
commit
9d59cc40da
8 changed files with 184 additions and 20 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue