aboutsummaryrefslogtreecommitdiff
path: root/src/script/descriptor.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/script/descriptor.cpp')
-rw-r--r--src/script/descriptor.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/script/descriptor.cpp b/src/script/descriptor.cpp
index 9bcbe1ceef..434e106dad 100644
--- a/src/script/descriptor.cpp
+++ b/src/script/descriptor.cpp
@@ -644,7 +644,7 @@ public:
assert(outscripts.size() == 1);
subscripts.emplace_back(std::move(outscripts[0]));
}
- out = Merge(std::move(out), std::move(subprovider));
+ out.Merge(std::move(subprovider));
std::vector<CPubKey> pubkeys;
pubkeys.reserve(entries.size());
@@ -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;