mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-06-03 09:43:55 +02:00
wallet: fix importdescriptor silent fail
This commit is contained in:
@@ -1522,7 +1522,9 @@ static UniValue ProcessDescriptorImport(CWallet * const pwallet, const UniValue&
|
||||
// Need to ExpandPrivate to check if private keys are available for all pubkeys
|
||||
FlatSigningProvider expand_keys;
|
||||
std::vector<CScript> scripts;
|
||||
parsed_desc->Expand(0, keys, scripts, expand_keys);
|
||||
if (!parsed_desc->Expand(0, keys, scripts, expand_keys)) {
|
||||
throw JSONRPCError(RPC_WALLET_ERROR, "Cannot expand descriptor. Probably because of hardened derivations without private keys provided");
|
||||
}
|
||||
parsed_desc->ExpandPrivate(0, keys, expand_keys);
|
||||
|
||||
// Check if all private keys are provided
|
||||
|
||||
Reference in New Issue
Block a user