HomePhabricator

Import watch only pubkeys to the keypool if private keys are disabled

Description

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

Details

Provenance
Andrew Chow <achow101-github@achow101.com>Authored on Nov 6 2018, 14:43
deadalnixCommitted on Jun 4 2020, 17:47
deadalnixPushed on Jun 4 2020, 17:47
Reviewer
Restricted Project
Differential Revision
D6366: Import watch only pubkeys to the keypool if private keys are disabled
Parents
rABC85617361eb2f: blockfilter: Update BIP 158 test vectors.
Branches
Unknown
Tags
Unknown