mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-03-24 22:45:41 +01:00
descriptor: check if rawtr has only one key.
This commit is contained in:
@@ -1472,6 +1472,10 @@ std::unique_ptr<DescriptorImpl> ParseScript(uint32_t& key_exp_index, Span<const
|
||||
}
|
||||
if (ctx == ParseScriptContext::TOP && Func("rawtr", expr)) {
|
||||
auto arg = Expr(expr);
|
||||
if (expr.size()) {
|
||||
error = strprintf("rawtr(): only one key expected.");
|
||||
return nullptr;
|
||||
}
|
||||
auto output_key = ParsePubkey(key_exp_index, arg, ParseScriptContext::P2TR, out, error);
|
||||
if (!output_key) return nullptr;
|
||||
++key_exp_index;
|
||||
|
||||
Reference in New Issue
Block a user