From 18ad54c3b21804ad540631dd4527cbad6d6ccc75 Mon Sep 17 00:00:00 2001 From: Pieter Wuille Date: Mon, 14 Feb 2022 18:11:39 -0500 Subject: [PATCH] Bugfix: set x-only flag when inferring pk() inside tr() --- src/script/descriptor.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/script/descriptor.cpp b/src/script/descriptor.cpp index 84040bf8477..9f12714e025 100644 --- a/src/script/descriptor.cpp +++ b/src/script/descriptor.cpp @@ -1253,7 +1253,7 @@ std::unique_ptr InferScript(const CScript& script, ParseScriptCo { if (ctx == ParseScriptContext::P2TR && script.size() == 34 && script[0] == 32 && script[33] == OP_CHECKSIG) { XOnlyPubKey key{Span{script}.subspan(1, 32)}; - return std::make_unique(InferXOnlyPubkey(key, ctx, provider)); + return std::make_unique(InferXOnlyPubkey(key, ctx, provider), true); } std::vector> data;