diff --git a/src/script/miniscript.h b/src/script/miniscript.h index 80c12ee1f53..4f5c38bb7b6 100644 --- a/src/script/miniscript.h +++ b/src/script/miniscript.h @@ -184,11 +184,11 @@ inline consteval Type operator"" _mst(const char* c, size_t l) { using Opcode = std::pair>; template struct Node; -template using NodeRef = std::shared_ptr>; +template using NodeRef = std::unique_ptr>; -//! Construct a miniscript node as a shared_ptr. +//! Construct a miniscript node as a unique_ptr. template -NodeRef MakeNodeRef(Args&&... args) { return std::make_shared>(std::forward(args)...); } +NodeRef MakeNodeRef(Args&&... args) { return std::make_unique>(std::forward(args)...); } //! The different node types in miniscript. enum class Fragment {