mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-03-05 04:29:36 +01:00
descriptors: Change Parse to return vector of descriptors
When given a descriptor which contins a multipath derivation specifier, a vector of descriptors will be returned.
This commit is contained in:
@@ -69,10 +69,10 @@ static std::optional<std::pair<WalletDescriptor, FlatSigningProvider>> CreateWal
|
||||
|
||||
FlatSigningProvider keys;
|
||||
std::string error;
|
||||
std::unique_ptr<Descriptor> parsed_desc{Parse(desc_str.value(), keys, error, false)};
|
||||
if (!parsed_desc) return std::nullopt;
|
||||
std::vector<std::unique_ptr<Descriptor>> parsed_descs = Parse(desc_str.value(), keys, error, false);
|
||||
if (parsed_descs.empty()) return std::nullopt;
|
||||
|
||||
WalletDescriptor w_desc{std::move(parsed_desc), /*creation_time=*/0, /*range_start=*/0, /*range_end=*/1, /*next_index=*/1};
|
||||
WalletDescriptor w_desc{std::move(parsed_descs.at(0)), /*creation_time=*/0, /*range_start=*/0, /*range_end=*/1, /*next_index=*/1};
|
||||
return std::make_pair(w_desc, keys);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user