doc(miniscript): Explain why we operate on vectors

Explains the reason behind 198bbaee49 where we had earlier switched from operating on unique_ptr<Node> to plain Node.
This commit is contained in:
Hodlinator
2026-02-05 13:00:38 +01:00
parent da51b5e4d2
commit fd7c494c6b

View File

@@ -552,6 +552,9 @@ public:
// Destroy the subexpressions iteratively after moving out their
// subexpressions to avoid a stack-overflow due to recursive calls to
// the subs' destructors.
// We move vectors in order to only update array-pointers inside them
// rather than moving individual Node instances which would involve
// moving/copying each Node field.
std::vector<std::vector<Node>> queue;
queue.push_back(std::move(subs));
do {