Skip to content

Commit

Permalink
Bugfix: set x-only flag when inferring pk() inside tr()
Browse files Browse the repository at this point in the history
  • Loading branch information
sipa committed Feb 14, 2022
1 parent 8fe6f5a commit 18ad54c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/script/descriptor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 18ad54c

Please sign in to comment.