HomePhabricator

[backport#17260 3/3] Refactor: Split up CWallet and LegacyScriptPubKeyMan and…

Description

[backport#17260 3/3] Refactor: Split up CWallet and LegacyScriptPubKeyMan and classes

Summary:
This moves CWallet members and methods dealing with keys to a new
LegacyScriptPubKeyMan class, and updates calling code to reference the new
class instead of CWallet.

Most of the changes are simple text replacements and variable substitutions
easily verified with:

git log -p -n1 -U0 --word-diff-regex=.

The only nontrivial chunk of code added is the new LegacyScriptPubKeyMan class
declaration, but this code isn't new and is just selectively copied and moved
from the previous CWallet class declaration. This can be verified with:

git log -p -n1 --color-moved=dimmed_zebra src/wallet/scriptpubkeyman.h src/wallet/wallet.h

or

git diff HEAD~1:src/wallet/wallet.h HEAD:src/wallet/scriptpubkeyman.h

This commit does not change behavior.


https://github.com/bitcoin/bitcoin/pull/17260/commits/f201ba59ffd2e071a36a688b80d2cff9a9c44bb2

Depends on D7006

Concludes backport of Core PR17260

NOTE: some changes to wallet/ismine_tests.cpp should have been made in D6663, but due to PRs being done out of order I missed that many tests were moved into it from test/script_standard_tests.cpp. this diff fixes that oversight.

Test Plan:

ninja check check-functional

Reviewers: #bitcoin_abc, deadalnix

Reviewed By: #bitcoin_abc, deadalnix

Subscribers: deadalnix

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

Details

Provenance
Andrew Chow <achow101-github@achow101.com>Authored on Oct 7 2019, 18:11
majcostaCommitted on Aug 6 2020, 19:55
majcostaPushed on Aug 6 2020, 19:56
Reviewer
Restricted Project
Differential Revision
D7119: [backport#17260 3/3] Refactor: Split up CWallet and LegacyScriptPubKeyMan and classes
Parents
rABC4c4b9a652121: [backport#17260 2/3] MOVEONLY: Move key handling code out of wallet to keyman…
Branches
Unknown
Tags
Unknown