Bugfix: set x-only flag when inferring pk() inside tr()

This commit is contained in:
Pieter Wuille committed 2022-02-14 18:14:10 -05:00
1 parent 8fe6f5a6fb
commit 18ad54c3b2
1 file changed
+1 -1
+1 -1
View File
@@ -1253,7 +1253,7 @@ std::unique_ptr<DescriptorImpl> 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<PKDescriptor>(InferXOnlyPubkey(key, ctx, provider));
return std::make_unique<PKDescriptor>(InferXOnlyPubkey(key, ctx, provider), true);
}
std::vector<std::vector<unsigned char>> data;