mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-01-19 23:03:45 +01:00
descriptors: Reject + sign when parsing multi threshold
This commit is contained in:
@@ -1821,7 +1821,9 @@ std::vector<std::unique_ptr<DescriptorImpl>> ParseScript(uint32_t& key_exp_index
|
||||
auto threshold = Expr(expr);
|
||||
uint32_t thres;
|
||||
std::vector<std::vector<std::unique_ptr<PubkeyProvider>>> providers; // List of multipath expanded pubkeys
|
||||
if (!ParseUInt32(std::string(threshold.begin(), threshold.end()), &thres)) {
|
||||
if (const auto maybe_thres{ToIntegral<uint32_t>(std::string_view{threshold.begin(), threshold.end()})}) {
|
||||
thres = *maybe_thres;
|
||||
} else {
|
||||
error = strprintf("Multi threshold '%s' is not valid", std::string(threshold.begin(), threshold.end()));
|
||||
return {};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user