mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-03-21 13:10:08 +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:
@@ -660,11 +660,13 @@ CreatedTransactionResult FundTransaction(CWallet& wallet, const CMutableTransact
|
||||
FlatSigningProvider desc_out;
|
||||
std::string error;
|
||||
std::vector<CScript> scripts_temp;
|
||||
std::unique_ptr<Descriptor> desc = Parse(desc_str, desc_out, error, true);
|
||||
if (!desc) {
|
||||
auto descs = Parse(desc_str, desc_out, error, true);
|
||||
if (descs.empty()) {
|
||||
throw JSONRPCError(RPC_INVALID_PARAMETER, strprintf("Unable to parse descriptor '%s': %s", desc_str, error));
|
||||
}
|
||||
desc->Expand(0, desc_out, scripts_temp, desc_out);
|
||||
for (auto& desc : descs) {
|
||||
desc->Expand(0, desc_out, scripts_temp, desc_out);
|
||||
}
|
||||
coinControl.m_external_provider.Merge(std::move(desc_out));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user