Refactor: Allow LegacyScriptPubKeyMan to be null

In CWallet::LoadWallet, use this to detect and empty wallet with no keys

This commit does not change behavior.
This commit is contained in:
Andrew Chow
2019-10-07 14:11:34 -04:00
parent fadc08ad94
commit eb81fc3ee5
15 changed files with 86 additions and 37 deletions

View File

@@ -16,7 +16,7 @@ BOOST_FIXTURE_TEST_SUITE(psbt_wallet_tests, WalletTestingSetup)
BOOST_AUTO_TEST_CASE(psbt_updater_test)
{
auto spk_man = m_wallet.GetLegacyScriptPubKeyMan();
auto spk_man = m_wallet.GetOrCreateLegacyScriptPubKeyMan();
LOCK2(m_wallet.cs_wallet, spk_man->cs_KeyStore);
// Create prevtxs and add to wallet