From 3f10ee4fc429adee70a31bd01ed1f6c357877595 Mon Sep 17 00:00:00 2001 From: Ava Chow Date: Mon, 30 Dec 2024 16:15:13 -0500 Subject: [PATCH] miniscript: Ensure there is no NodeRef copy constructor or assignment operator --- src/script/miniscript.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/script/miniscript.h b/src/script/miniscript.h index ac0d0469422..80c12ee1f53 100644 --- a/src/script/miniscript.h +++ b/src/script/miniscript.h @@ -1687,6 +1687,10 @@ public: : Node(internal::NoDupCheck{}, ctx.MsContext(), nt, std::move(sub), val) { DuplicateKeyCheck(ctx); } template Node(const Ctx& ctx, Fragment nt, uint32_t val = 0) : Node(internal::NoDupCheck{}, ctx.MsContext(), nt, val) { DuplicateKeyCheck(ctx); } + + // Delete copy constructor and assignment operator, use Clone() instead + Node(const Node&) = delete; + Node& operator=(const Node&) = delete; }; namespace internal {