Skip to content

Commit 6cf4ea7

Browse files
committed
Avoid the use of P0083R3 std::set::merge
1 parent 3e306ee commit 6cf4ea7

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/script/standard.cpp

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -407,7 +407,13 @@ void TaprootSpendData::Merge(TaprootSpendData other)
407407
merkle_root = other.merkle_root;
408408
}
409409
for (auto& [key, control_blocks] : other.scripts) {
410-
scripts[key].merge(std::move(control_blocks));
410+
// Once P0083R3 is supported by all our targeted platforms,
411+
// this loop body can be replaced with:
412+
// scripts[key].merge(std::move(control_blocks));
413+
auto& target = scripts[key];
414+
for (auto& control_block: control_blocks) {
415+
target.insert(std::move(control_block));
416+
}
411417
}
412418
}
413419

0 commit comments

Comments
 (0)