mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-04-10 15:47:17 +02:00
43c528aba9wallet, test: update `gethdkeys` functional test (rkrux)6e3a0afc2fwallet: fix `gethdkeys` RPC for descriptors with partial xprvs (rkrux) Pull request description: Fixes #34378 A non-watch-only wallet allows to import descriptors with partial private keys, eg: a multisig descriptor with one private key and one public key. In case an xpub is imported in any such descriptors whose private key the wallet doesn't have, then the `gethdkeys` RPC throws an unhandled error like below when the private keys are requested. This fix ensures that such calls are properly handled by conditionally finding the corresponding xprv and the related functional test is accordingly updated. ``` ➜ bitcoincli -named gethdkeys private=true error code: -1 error message: map::at: key not found ``` ACKs for top commit: achow101: ACK43c528aba9w0xlt: ACK43c528aba9Eunovo: Tested ACK43c528aba9Tree-SHA512: 106e02ee368a3fa94d116f54f2fa71f9886e4753e331b91ce13a346559d5497ef6cd7ddaa8736fcfe1a7ac427a44d647fb75e523eb72f917fa866adbe0dbad30