Import watch only pubkeys to the keypool if private keys are disabled
Summary:
- Add a method to add a pubkey to the keypool
Introduces AddKeypoolPubkey in order to add a pubkey to the keypool
- Fetch keys from keypool when private keys are disabled
When private keys are disabled, still fetch keys from the keypool
if the keypool has keys. Those keys come from importing them and
adding them to the keypool.
- Add option to importmulti add an imported pubkey to the keypool
Adds a new option to importmulti where the pubkeys specified in the import
object can be added to the keypool. This only works if the wallet has
private keys disabled.
- Test pubkey import to keypool
- Import public keys in order
Do public key imports in the order that they are specified in the import
or in the descriptor range.
This is a backport of Core PR14075
Test Plan:
ninja all check-all
Reviewers: #bitcoin_abc, majcosta
Reviewed By: #bitcoin_abc, majcosta
Differential Revision: https://reviews.bitcoinabc.org/D6366