Skip to content

Commit d6045d0

Browse files
committed
scripted-diff: Replace WalletDatabase::Create* with CreateWalletDatabase
-BEGIN VERIFY SCRIPT- sed -i -e 's/WalletDatabase::Create(/CreateWalletDatabase(/g' `git grep -l "WalletDatabase::Create("` sed -i -e 's/WalletDatabase::CreateDummy(/CreateDummyWalletDatabase(/g' `git grep -l "WalletDatabase::CreateDummy("` sed -i -e 's/WalletDatabase::CreateMock(/CreateMockWalletDatabase(/g' `git grep -l "WalletDatabase::CreateMock("` -END VERIFY SCRIPT-
1 parent 45c08f8 commit d6045d0

12 files changed

+46
-46
lines changed

src/bench/coin_selection.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ static void CoinSelection(benchmark::State& state)
3131
{
3232
NodeContext node;
3333
auto chain = interfaces::MakeChain(node);
34-
CWallet wallet(chain.get(), WalletLocation(), WalletDatabase::CreateDummy());
34+
CWallet wallet(chain.get(), WalletLocation(), CreateDummyWalletDatabase());
3535
wallet.SetupLegacyScriptPubKeyMan();
3636
std::vector<std::unique_ptr<CWalletTx>> wtxs;
3737
LOCK(wallet.cs_wallet);
@@ -65,7 +65,7 @@ static void CoinSelection(benchmark::State& state)
6565
typedef std::set<CInputCoin> CoinSet;
6666
static NodeContext testNode;
6767
static auto testChain = interfaces::MakeChain(testNode);
68-
static CWallet testWallet(testChain.get(), WalletLocation(), WalletDatabase::CreateDummy());
68+
static CWallet testWallet(testChain.get(), WalletLocation(), CreateDummyWalletDatabase());
6969
std::vector<std::unique_ptr<CWalletTx>> wtxn;
7070

7171
// Copied from src/wallet/test/coinselector_tests.cpp

src/bench/wallet_balance.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ static void WalletBalance(benchmark::State& state, const bool set_dirty, const b
2626

2727
NodeContext node;
2828
std::unique_ptr<interfaces::Chain> chain = interfaces::MakeChain(node);
29-
CWallet wallet{chain.get(), WalletLocation(), WalletDatabase::CreateMock()};
29+
CWallet wallet{chain.get(), WalletLocation(), CreateMockWalletDatabase()};
3030
{
3131
wallet.SetupLegacyScriptPubKeyMan();
3232
bool first_run;

src/qt/test/addressbooktests.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ void EditAddressAndSubmit(
5959
void TestAddAddressesToSendBook(interfaces::Node& node)
6060
{
6161
TestChain100Setup test;
62-
std::shared_ptr<CWallet> wallet = std::make_shared<CWallet>(node.context()->chain.get(), WalletLocation(), WalletDatabase::CreateMock());
62+
std::shared_ptr<CWallet> wallet = std::make_shared<CWallet>(node.context()->chain.get(), WalletLocation(), CreateMockWalletDatabase());
6363
wallet->SetupLegacyScriptPubKeyMan();
6464
bool firstRun;
6565
wallet->LoadWallet(firstRun);

src/qt/test/wallettests.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ void TestGUI(interfaces::Node& node)
140140
}
141141
node.context()->connman = std::move(test.m_node.connman);
142142
node.context()->mempool = std::move(test.m_node.mempool);
143-
std::shared_ptr<CWallet> wallet = std::make_shared<CWallet>(node.context()->chain.get(), WalletLocation(), WalletDatabase::CreateMock());
143+
std::shared_ptr<CWallet> wallet = std::make_shared<CWallet>(node.context()->chain.get(), WalletLocation(), CreateMockWalletDatabase());
144144
bool firstRun;
145145
wallet->LoadWallet(firstRun);
146146
{

src/wallet/salvage.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ bool RecoverDatabaseFile(const fs::path& file_path)
116116
}
117117

118118
DbTxn* ptxn = env->TxnBegin();
119-
CWallet dummyWallet(nullptr, WalletLocation(), WalletDatabase::CreateDummy());
119+
CWallet dummyWallet(nullptr, WalletLocation(), CreateDummyWalletDatabase());
120120
for (KeyValPair& row : salvagedData)
121121
{
122122
/* Filter for only private key type KV pairs to be added to the salvaged wallet */

src/wallet/test/coinselector_tests.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ typedef std::set<CInputCoin> CoinSet;
2929
static std::vector<COutput> vCoins;
3030
static NodeContext testNode;
3131
static auto testChain = interfaces::MakeChain(testNode);
32-
static CWallet testWallet(testChain.get(), WalletLocation(), WalletDatabase::CreateDummy());
32+
static CWallet testWallet(testChain.get(), WalletLocation(), CreateDummyWalletDatabase());
3333
static CAmount balance = 0;
3434

3535
CoinEligibilityFilter filter_standard(1, 6, 0);
@@ -283,7 +283,7 @@ BOOST_AUTO_TEST_CASE(bnb_search_test)
283283
// Make sure that can use BnB when there are preset inputs
284284
empty_wallet();
285285
{
286-
std::unique_ptr<CWallet> wallet = MakeUnique<CWallet>(m_chain.get(), WalletLocation(), WalletDatabase::CreateMock());
286+
std::unique_ptr<CWallet> wallet = MakeUnique<CWallet>(m_chain.get(), WalletLocation(), CreateMockWalletDatabase());
287287
bool firstRun;
288288
wallet->LoadWallet(firstRun);
289289
wallet->SetupLegacyScriptPubKeyMan();

src/wallet/test/ismine_tests.cpp

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ BOOST_AUTO_TEST_CASE(ismine_standard)
3535

3636
// P2PK compressed
3737
{
38-
CWallet keystore(chain.get(), WalletLocation(), WalletDatabase::CreateDummy());
38+
CWallet keystore(chain.get(), WalletLocation(), CreateDummyWalletDatabase());
3939
keystore.SetupLegacyScriptPubKeyMan();
4040
LOCK(keystore.GetLegacyScriptPubKeyMan()->cs_KeyStore);
4141
scriptPubKey = GetScriptForRawPubKey(pubkeys[0]);
@@ -52,7 +52,7 @@ BOOST_AUTO_TEST_CASE(ismine_standard)
5252

5353
// P2PK uncompressed
5454
{
55-
CWallet keystore(chain.get(), WalletLocation(), WalletDatabase::CreateDummy());
55+
CWallet keystore(chain.get(), WalletLocation(), CreateDummyWalletDatabase());
5656
keystore.SetupLegacyScriptPubKeyMan();
5757
LOCK(keystore.GetLegacyScriptPubKeyMan()->cs_KeyStore);
5858
scriptPubKey = GetScriptForRawPubKey(uncompressedPubkey);
@@ -69,7 +69,7 @@ BOOST_AUTO_TEST_CASE(ismine_standard)
6969

7070
// P2PKH compressed
7171
{
72-
CWallet keystore(chain.get(), WalletLocation(), WalletDatabase::CreateDummy());
72+
CWallet keystore(chain.get(), WalletLocation(), CreateDummyWalletDatabase());
7373
keystore.SetupLegacyScriptPubKeyMan();
7474
LOCK(keystore.GetLegacyScriptPubKeyMan()->cs_KeyStore);
7575
scriptPubKey = GetScriptForDestination(PKHash(pubkeys[0]));
@@ -86,7 +86,7 @@ BOOST_AUTO_TEST_CASE(ismine_standard)
8686

8787
// P2PKH uncompressed
8888
{
89-
CWallet keystore(chain.get(), WalletLocation(), WalletDatabase::CreateDummy());
89+
CWallet keystore(chain.get(), WalletLocation(), CreateDummyWalletDatabase());
9090
keystore.SetupLegacyScriptPubKeyMan();
9191
LOCK(keystore.GetLegacyScriptPubKeyMan()->cs_KeyStore);
9292
scriptPubKey = GetScriptForDestination(PKHash(uncompressedPubkey));
@@ -103,7 +103,7 @@ BOOST_AUTO_TEST_CASE(ismine_standard)
103103

104104
// P2SH
105105
{
106-
CWallet keystore(chain.get(), WalletLocation(), WalletDatabase::CreateDummy());
106+
CWallet keystore(chain.get(), WalletLocation(), CreateDummyWalletDatabase());
107107
keystore.SetupLegacyScriptPubKeyMan();
108108
LOCK(keystore.GetLegacyScriptPubKeyMan()->cs_KeyStore);
109109

@@ -127,7 +127,7 @@ BOOST_AUTO_TEST_CASE(ismine_standard)
127127

128128
// (P2PKH inside) P2SH inside P2SH (invalid)
129129
{
130-
CWallet keystore(chain.get(), WalletLocation(), WalletDatabase::CreateDummy());
130+
CWallet keystore(chain.get(), WalletLocation(), CreateDummyWalletDatabase());
131131
keystore.SetupLegacyScriptPubKeyMan();
132132
LOCK(keystore.GetLegacyScriptPubKeyMan()->cs_KeyStore);
133133

@@ -145,7 +145,7 @@ BOOST_AUTO_TEST_CASE(ismine_standard)
145145

146146
// (P2PKH inside) P2SH inside P2WSH (invalid)
147147
{
148-
CWallet keystore(chain.get(), WalletLocation(), WalletDatabase::CreateDummy());
148+
CWallet keystore(chain.get(), WalletLocation(), CreateDummyWalletDatabase());
149149
keystore.SetupLegacyScriptPubKeyMan();
150150
LOCK(keystore.GetLegacyScriptPubKeyMan()->cs_KeyStore);
151151

@@ -163,7 +163,7 @@ BOOST_AUTO_TEST_CASE(ismine_standard)
163163

164164
// P2WPKH inside P2WSH (invalid)
165165
{
166-
CWallet keystore(chain.get(), WalletLocation(), WalletDatabase::CreateDummy());
166+
CWallet keystore(chain.get(), WalletLocation(), CreateDummyWalletDatabase());
167167
keystore.SetupLegacyScriptPubKeyMan();
168168
LOCK(keystore.GetLegacyScriptPubKeyMan()->cs_KeyStore);
169169

@@ -179,7 +179,7 @@ BOOST_AUTO_TEST_CASE(ismine_standard)
179179

180180
// (P2PKH inside) P2WSH inside P2WSH (invalid)
181181
{
182-
CWallet keystore(chain.get(), WalletLocation(), WalletDatabase::CreateDummy());
182+
CWallet keystore(chain.get(), WalletLocation(), CreateDummyWalletDatabase());
183183
keystore.SetupLegacyScriptPubKeyMan();
184184
LOCK(keystore.GetLegacyScriptPubKeyMan()->cs_KeyStore);
185185

@@ -197,7 +197,7 @@ BOOST_AUTO_TEST_CASE(ismine_standard)
197197

198198
// P2WPKH compressed
199199
{
200-
CWallet keystore(chain.get(), WalletLocation(), WalletDatabase::CreateDummy());
200+
CWallet keystore(chain.get(), WalletLocation(), CreateDummyWalletDatabase());
201201
keystore.SetupLegacyScriptPubKeyMan();
202202
LOCK(keystore.GetLegacyScriptPubKeyMan()->cs_KeyStore);
203203
BOOST_CHECK(keystore.GetLegacyScriptPubKeyMan()->AddKey(keys[0]));
@@ -212,7 +212,7 @@ BOOST_AUTO_TEST_CASE(ismine_standard)
212212

213213
// P2WPKH uncompressed
214214
{
215-
CWallet keystore(chain.get(), WalletLocation(), WalletDatabase::CreateDummy());
215+
CWallet keystore(chain.get(), WalletLocation(), CreateDummyWalletDatabase());
216216
keystore.SetupLegacyScriptPubKeyMan();
217217
LOCK(keystore.GetLegacyScriptPubKeyMan()->cs_KeyStore);
218218
BOOST_CHECK(keystore.GetLegacyScriptPubKeyMan()->AddKey(uncompressedKey));
@@ -231,7 +231,7 @@ BOOST_AUTO_TEST_CASE(ismine_standard)
231231

232232
// scriptPubKey multisig
233233
{
234-
CWallet keystore(chain.get(), WalletLocation(), WalletDatabase::CreateDummy());
234+
CWallet keystore(chain.get(), WalletLocation(), CreateDummyWalletDatabase());
235235
keystore.SetupLegacyScriptPubKeyMan();
236236
LOCK(keystore.GetLegacyScriptPubKeyMan()->cs_KeyStore);
237237

@@ -262,7 +262,7 @@ BOOST_AUTO_TEST_CASE(ismine_standard)
262262

263263
// P2SH multisig
264264
{
265-
CWallet keystore(chain.get(), WalletLocation(), WalletDatabase::CreateDummy());
265+
CWallet keystore(chain.get(), WalletLocation(), CreateDummyWalletDatabase());
266266
keystore.SetupLegacyScriptPubKeyMan();
267267
LOCK(keystore.GetLegacyScriptPubKeyMan()->cs_KeyStore);
268268
BOOST_CHECK(keystore.GetLegacyScriptPubKeyMan()->AddKey(uncompressedKey));
@@ -283,7 +283,7 @@ BOOST_AUTO_TEST_CASE(ismine_standard)
283283

284284
// P2WSH multisig with compressed keys
285285
{
286-
CWallet keystore(chain.get(), WalletLocation(), WalletDatabase::CreateDummy());
286+
CWallet keystore(chain.get(), WalletLocation(), CreateDummyWalletDatabase());
287287
keystore.SetupLegacyScriptPubKeyMan();
288288
LOCK(keystore.GetLegacyScriptPubKeyMan()->cs_KeyStore);
289289
BOOST_CHECK(keystore.GetLegacyScriptPubKeyMan()->AddKey(keys[0]));
@@ -309,7 +309,7 @@ BOOST_AUTO_TEST_CASE(ismine_standard)
309309

310310
// P2WSH multisig with uncompressed key
311311
{
312-
CWallet keystore(chain.get(), WalletLocation(), WalletDatabase::CreateDummy());
312+
CWallet keystore(chain.get(), WalletLocation(), CreateDummyWalletDatabase());
313313
keystore.SetupLegacyScriptPubKeyMan();
314314
LOCK(keystore.GetLegacyScriptPubKeyMan()->cs_KeyStore);
315315
BOOST_CHECK(keystore.GetLegacyScriptPubKeyMan()->AddKey(uncompressedKey));
@@ -335,7 +335,7 @@ BOOST_AUTO_TEST_CASE(ismine_standard)
335335

336336
// P2WSH multisig wrapped in P2SH
337337
{
338-
CWallet keystore(chain.get(), WalletLocation(), WalletDatabase::CreateDummy());
338+
CWallet keystore(chain.get(), WalletLocation(), CreateDummyWalletDatabase());
339339
keystore.SetupLegacyScriptPubKeyMan();
340340
LOCK(keystore.GetLegacyScriptPubKeyMan()->cs_KeyStore);
341341

@@ -362,7 +362,7 @@ BOOST_AUTO_TEST_CASE(ismine_standard)
362362

363363
// OP_RETURN
364364
{
365-
CWallet keystore(chain.get(), WalletLocation(), WalletDatabase::CreateDummy());
365+
CWallet keystore(chain.get(), WalletLocation(), CreateDummyWalletDatabase());
366366
keystore.SetupLegacyScriptPubKeyMan();
367367
LOCK(keystore.GetLegacyScriptPubKeyMan()->cs_KeyStore);
368368
BOOST_CHECK(keystore.GetLegacyScriptPubKeyMan()->AddKey(keys[0]));
@@ -376,7 +376,7 @@ BOOST_AUTO_TEST_CASE(ismine_standard)
376376

377377
// witness unspendable
378378
{
379-
CWallet keystore(chain.get(), WalletLocation(), WalletDatabase::CreateDummy());
379+
CWallet keystore(chain.get(), WalletLocation(), CreateDummyWalletDatabase());
380380
keystore.SetupLegacyScriptPubKeyMan();
381381
LOCK(keystore.GetLegacyScriptPubKeyMan()->cs_KeyStore);
382382
BOOST_CHECK(keystore.GetLegacyScriptPubKeyMan()->AddKey(keys[0]));
@@ -390,7 +390,7 @@ BOOST_AUTO_TEST_CASE(ismine_standard)
390390

391391
// witness unknown
392392
{
393-
CWallet keystore(chain.get(), WalletLocation(), WalletDatabase::CreateDummy());
393+
CWallet keystore(chain.get(), WalletLocation(), CreateDummyWalletDatabase());
394394
keystore.SetupLegacyScriptPubKeyMan();
395395
LOCK(keystore.GetLegacyScriptPubKeyMan()->cs_KeyStore);
396396
BOOST_CHECK(keystore.GetLegacyScriptPubKeyMan()->AddKey(keys[0]));
@@ -404,7 +404,7 @@ BOOST_AUTO_TEST_CASE(ismine_standard)
404404

405405
// Nonstandard
406406
{
407-
CWallet keystore(chain.get(), WalletLocation(), WalletDatabase::CreateDummy());
407+
CWallet keystore(chain.get(), WalletLocation(), CreateDummyWalletDatabase());
408408
keystore.SetupLegacyScriptPubKeyMan();
409409
LOCK(keystore.GetLegacyScriptPubKeyMan()->cs_KeyStore);
410410
BOOST_CHECK(keystore.GetLegacyScriptPubKeyMan()->AddKey(keys[0]));

src/wallet/test/scriptpubkeyman_tests.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ BOOST_AUTO_TEST_CASE(CanProvide)
1919
// Set up wallet and keyman variables.
2020
NodeContext node;
2121
std::unique_ptr<interfaces::Chain> chain = interfaces::MakeChain(node);
22-
CWallet wallet(chain.get(), WalletLocation(), WalletDatabase::CreateDummy());
22+
CWallet wallet(chain.get(), WalletLocation(), CreateDummyWalletDatabase());
2323
LegacyScriptPubKeyMan& keyman = *wallet.GetOrCreateLegacyScriptPubKeyMan();
2424

2525
// Make a 1 of 2 multisig script

src/wallet/test/wallet_test_fixture.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
WalletTestingSetup::WalletTestingSetup(const std::string& chainName)
88
: TestingSetup(chainName),
9-
m_wallet(m_chain.get(), WalletLocation(), WalletDatabase::CreateMock())
9+
m_wallet(m_chain.get(), WalletLocation(), CreateMockWalletDatabase())
1010
{
1111
bool fFirstRun;
1212
m_wallet.LoadWallet(fFirstRun);

src/wallet/test/wallet_tests.cpp

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ BOOST_FIXTURE_TEST_CASE(scan_for_wallet_transactions, TestChain100Setup)
8080

8181
// Verify ScanForWalletTransactions fails to read an unknown start block.
8282
{
83-
CWallet wallet(chain.get(), WalletLocation(), WalletDatabase::CreateDummy());
83+
CWallet wallet(chain.get(), WalletLocation(), CreateDummyWalletDatabase());
8484
{
8585
LOCK(wallet.cs_wallet);
8686
wallet.SetLastBlockProcessed(::ChainActive().Height(), ::ChainActive().Tip()->GetBlockHash());
@@ -99,7 +99,7 @@ BOOST_FIXTURE_TEST_CASE(scan_for_wallet_transactions, TestChain100Setup)
9999
// Verify ScanForWalletTransactions picks up transactions in both the old
100100
// and new block files.
101101
{
102-
CWallet wallet(chain.get(), WalletLocation(), WalletDatabase::CreateDummy());
102+
CWallet wallet(chain.get(), WalletLocation(), CreateDummyWalletDatabase());
103103
{
104104
LOCK(wallet.cs_wallet);
105105
wallet.SetLastBlockProcessed(::ChainActive().Height(), ::ChainActive().Tip()->GetBlockHash());
@@ -125,7 +125,7 @@ BOOST_FIXTURE_TEST_CASE(scan_for_wallet_transactions, TestChain100Setup)
125125
// Verify ScanForWalletTransactions only picks transactions in the new block
126126
// file.
127127
{
128-
CWallet wallet(chain.get(), WalletLocation(), WalletDatabase::CreateDummy());
128+
CWallet wallet(chain.get(), WalletLocation(), CreateDummyWalletDatabase());
129129
{
130130
LOCK(wallet.cs_wallet);
131131
wallet.SetLastBlockProcessed(::ChainActive().Height(), ::ChainActive().Tip()->GetBlockHash());
@@ -150,7 +150,7 @@ BOOST_FIXTURE_TEST_CASE(scan_for_wallet_transactions, TestChain100Setup)
150150

151151
// Verify ScanForWalletTransactions scans no blocks.
152152
{
153-
CWallet wallet(chain.get(), WalletLocation(), WalletDatabase::CreateDummy());
153+
CWallet wallet(chain.get(), WalletLocation(), CreateDummyWalletDatabase());
154154
{
155155
LOCK(wallet.cs_wallet);
156156
wallet.SetLastBlockProcessed(::ChainActive().Height(), ::ChainActive().Tip()->GetBlockHash());
@@ -189,7 +189,7 @@ BOOST_FIXTURE_TEST_CASE(importmulti_rescan, TestChain100Setup)
189189
// before the missing block, and success for a key whose creation time is
190190
// after.
191191
{
192-
std::shared_ptr<CWallet> wallet = std::make_shared<CWallet>(chain.get(), WalletLocation(), WalletDatabase::CreateDummy());
192+
std::shared_ptr<CWallet> wallet = std::make_shared<CWallet>(chain.get(), WalletLocation(), CreateDummyWalletDatabase());
193193
wallet->SetupLegacyScriptPubKeyMan();
194194
WITH_LOCK(wallet->cs_wallet, wallet->SetLastBlockProcessed(newTip->nHeight, newTip->GetBlockHash()));
195195
AddWallet(wallet);
@@ -254,7 +254,7 @@ BOOST_FIXTURE_TEST_CASE(importwallet_rescan, TestChain100Setup)
254254

255255
// Import key into wallet and call dumpwallet to create backup file.
256256
{
257-
std::shared_ptr<CWallet> wallet = std::make_shared<CWallet>(chain.get(), WalletLocation(), WalletDatabase::CreateDummy());
257+
std::shared_ptr<CWallet> wallet = std::make_shared<CWallet>(chain.get(), WalletLocation(), CreateDummyWalletDatabase());
258258
{
259259
auto spk_man = wallet->GetOrCreateLegacyScriptPubKeyMan();
260260
LOCK2(wallet->cs_wallet, spk_man->cs_KeyStore);
@@ -276,7 +276,7 @@ BOOST_FIXTURE_TEST_CASE(importwallet_rescan, TestChain100Setup)
276276
// Call importwallet RPC and verify all blocks with timestamps >= BLOCK_TIME
277277
// were scanned, and no prior blocks were scanned.
278278
{
279-
std::shared_ptr<CWallet> wallet = std::make_shared<CWallet>(chain.get(), WalletLocation(), WalletDatabase::CreateDummy());
279+
std::shared_ptr<CWallet> wallet = std::make_shared<CWallet>(chain.get(), WalletLocation(), CreateDummyWalletDatabase());
280280
LOCK(wallet->cs_wallet);
281281
wallet->SetupLegacyScriptPubKeyMan();
282282

@@ -312,7 +312,7 @@ BOOST_FIXTURE_TEST_CASE(coin_mark_dirty_immature_credit, TestChain100Setup)
312312
NodeContext node;
313313
auto chain = interfaces::MakeChain(node);
314314

315-
CWallet wallet(chain.get(), WalletLocation(), WalletDatabase::CreateDummy());
315+
CWallet wallet(chain.get(), WalletLocation(), CreateDummyWalletDatabase());
316316
auto spk_man = wallet.GetOrCreateLegacyScriptPubKeyMan();
317317
CWalletTx wtx(&wallet, m_coinbase_txns.back());
318318

@@ -486,7 +486,7 @@ class ListCoinsTestingSetup : public TestChain100Setup
486486
ListCoinsTestingSetup()
487487
{
488488
CreateAndProcessBlock({}, GetScriptForRawPubKey(coinbaseKey.GetPubKey()));
489-
wallet = MakeUnique<CWallet>(m_chain.get(), WalletLocation(), WalletDatabase::CreateMock());
489+
wallet = MakeUnique<CWallet>(m_chain.get(), WalletLocation(), CreateMockWalletDatabase());
490490
{
491491
LOCK2(wallet->cs_wallet, ::cs_main);
492492
wallet->SetLastBlockProcessed(::ChainActive().Height(), ::ChainActive().Tip()->GetBlockHash());
@@ -604,7 +604,7 @@ BOOST_FIXTURE_TEST_CASE(wallet_disableprivkeys, TestChain100Setup)
604604
{
605605
NodeContext node;
606606
auto chain = interfaces::MakeChain(node);
607-
std::shared_ptr<CWallet> wallet = std::make_shared<CWallet>(chain.get(), WalletLocation(), WalletDatabase::CreateDummy());
607+
std::shared_ptr<CWallet> wallet = std::make_shared<CWallet>(chain.get(), WalletLocation(), CreateDummyWalletDatabase());
608608
wallet->SetupLegacyScriptPubKeyMan();
609609
wallet->SetMinVersion(FEATURE_LATEST);
610610
wallet->SetWalletFlag(WALLET_FLAG_DISABLE_PRIVATE_KEYS);

0 commit comments

Comments
 (0)