| 372 | } |
| 373 | |
| 374 | void TaprootSpendData::Merge(TaprootSpendData other) |
| 375 | { |
| 376 | // TODO: figure out how to better deal with conflicting information |
| 377 | // being merged. |
| 378 | if (internal_key.IsNull() && !other.internal_key.IsNull()) { |
| 379 | internal_key = other.internal_key; |
| 380 | } |
| 381 | if (merkle_root.IsNull() && !other.merkle_root.IsNull()) { |
| 382 | merkle_root = other.merkle_root; |
| 383 | } |
| 384 | for (auto& [key, control_blocks] : other.scripts) { |
| 385 | scripts[key].merge(std::move(control_blocks)); |
| 386 | } |
| 387 | } |
| 388 | |
| 389 | void TaprootBuilder::Insert(TaprootBuilder::NodeInfo&& node, int depth) |
| 390 | { |
no test coverage detected