Skip to content

Commit 9c3751a

Browse files
author
MarcoFalke
committed
Merge bitcoin/bitcoin#22342: Avoid the use of P0083R3 std::set::merge
6cf4ea7 Avoid the use of P0083R3 std::set::merge (Pieter Wuille) Pull request description: This use was introduced in #21365, but as pointed out in #22339, this causes compatibility problems. Just avoid its use for now. ACKs for top commit: jonatack: re-ACK 6cf4ea7 benthecarman: ACK 6cf4ea7 hebasto: ACK 6cf4ea7, successfully compiled on the following systems: Tree-SHA512: 2b3fdcadb7de98963ebb0b192bd956aa68526457fe5b374c74a69ea10d5b68902763148f11abbcc471010bcdc799e0804faef5f8e8ff8a509b3a053c0cb0ba39
2 parents 3e306ee + 6cf4ea7 commit 9c3751a

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)