This adds readily-available context information to the error string, for further disambiguation.
This is a revival of #16123 which was largely addressed in #16542.
Note ‘Multi:’ is used rather than ‘multi():’ as it also encompasses ‘sortedmulti():’
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.
Reviewers, this pull request conflicts with the following ones:
If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.
Note 'Multi:' is used rather than 'multi():' as it also encompasses 'sortedmulti():'
1089@@ -1081,7 +1090,10 @@ std::unique_ptr<DescriptorImpl> ParseScript(uint32_t& key_exp_index, Span<const
1090 }
1091 auto arg = Expr(expr);
1092 auto pk = ParsePubkey(key_exp_index, arg, ctx, out, error);
1093- if (!pk) return nullptr;
1094+ if (!pk) {
1095+ error = strprintf("Multi: %s", error);
if block to get the right function name when Multi: is sufficient to get the point across. There can only be one multi in a descriptor anyways, so it should be obvious where the error is.
0 error = strprintf("%smulti: %s", sorted_multi ? "sorted" : "", error);
?