HomePhabricator

Add DescriptorCache* read_cache and DescriptorCache* write_cache to Expand and…

Description

Add DescriptorCache* read_cache and DescriptorCache* write_cache to Expand and GetPubKey

Summary:
Have Expand, ExpandFromCache, and ExpandHelper take additional DescriptorCache
parameters. These are then passed into PubkeyProvider::GetPubKey which
also takes them as arguments.

Reading and writing to the cache is pushed down into GetPubKey. The old cache where
pubkeys are serialized to a vector is completely removed and instead xpubs are being
cached in DescriptorCache.

Backport of Core PR18204 part [4/7] : https://github.com/bitcoin/bitcoin/pull/18204/commits/58f54b686f663e4c46a2cf7a64560409007c7eb3

Depends on D8383

Test Plan:

ninja all check

Reviewers: #bitcoin_abc, majcosta

Reviewed By: #bitcoin_abc, majcosta

Differential Revision: https://reviews.bitcoinabc.org/D8384

Details

Provenance
Andrew Chow <achow101-github@achow101.com>Authored on Feb 25 2020, 21:01
deadalnixCommitted on Nov 13 2020, 13:28
deadalnixPushed on Nov 13 2020, 13:28
Reviewer
Restricted Project
Differential Revision
D8384: Add DescriptorCache* read_cache and DescriptorCache* write_cache to Expand and GetPubKey
Parents
rABCca0a03351c0d: Rename BIP32PubkeyProvider.m_extkey to m_root_extkey
Branches
Unknown
Tags
Unknown