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():'
<!--e57a25ab6845829454e8d69fc972939a-->
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.
<!--174a7506f384e20aa4161008e828411d-->
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():'
ACK 9b526727000509dc6ef90f2ce6a9049edebf959c
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);
I don't understand why this can't (or shouldn't) be more specific?
I think it's just that it would result in a fairly large 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.
error = strprintf("%smulti: %s", sorted_multi ? "sorted" : "", error);
?
ACK 9b526727000509dc6ef90f2ce6a9049edebf959c