Page MenuHomePhabricator

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

Authored by majcosta on Aug 3 2020, 21:13.

Details

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

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

majcosta requested review of this revision.Aug 3 2020, 21:13

[Bot Message]
One or more PR numbers were detected in the summary.
Links to those PRs have been inserted into the summary for reference.

corrected lint-circular-dependencies.sh script

deadalnix requested changes to this revision.Aug 4 2020, 22:48
deadalnix added a subscriber: deadalnix.

Please point to the specific commit, please.

This revision now requires changes to proceed.Aug 4 2020, 22:48
majcosta requested review of this revision.Aug 5 2020, 04:34
majcosta edited the summary of this revision. (Show Details)

sry, added missing link to the commit

deadalnix added inline comments.
src/wallet/scriptpubkeyman.h
143 ↗(On Diff #22722)

double stars

This revision is now accepted and ready to land.Aug 6 2020, 16:33