Issue Details
- Number
- 27336
- Title
- Should be able to import an xpub descriptor to a privkey-enabled wallet if the wallet has the privkeys
- Description
- ### Please describe the feature you'd like to see added.
If you have a privkey-enabled wallet, you should be able to import a public descriptor where your wallet knows the private keys corresponding to (some of) the xpubs in the descriptor.
### Is your feature related to a problem, if so please describe it.
If you try to import a descriptor into a Core wallet that has private keys, and you only provide the public descriptor, it will fail with the error `Cannot import descriptor without private keys to a wallet with private keys enabled`. To do the import, you need to pull the private keys out of the wallet, populate the descriptor with them, recompute the checksum, then try again. This is unsafe and unnecessary.
### Describe the solution you'd like
Before erroring out, the wallet should check whether it actually has private keys that would allow it to import the descriptor.
### Describe any alternatives you've considered
_No response_
### Please leave any additional context
_No response_
- URL
-
https://github.com/bitcoin/bitcoin/issue/27336
- Closed by
-
Back to List