[backport#17261 3/13] Refactor: Allow LegacyScriptPubKeyMan to be null
Summary:
In CWallet::LoadWallet, use this to detect and empty wallet with no keys
This commit does not change behavior.
https://github.com/bitcoin/bitcoin/pull/17261/commits/eb81fc3ee58d3e88af36d8091b9e4017a8603b3c
Depends on D7838
Partial backport of Core PR17261
Test Plan:
export CC=clang CXX=clang++; cmake -GNinja -DCMAKE_BUILD_TYPE=Debug ninja all check check-functional
Reviewers: #bitcoin_abc, Fabien
Reviewed By: #bitcoin_abc, Fabien
Subscribers: Fabien
Differential Revision: https://reviews.bitcoinabc.org/D7848