@@ -52,7 +52,7 @@ static std::shared_ptr<CWallet> TestLoadWallet(NodeContext& node)
52
52
bilingual_str error;
53
53
std::vector<bilingual_str> warnings;
54
54
auto database = MakeWalletDatabase (" " , options, status, error);
55
- auto wallet = CWallet::Create (*node.chain , node.coinjoin_loader , " " , std::move (database), options.create_flags , error, warnings);
55
+ auto wallet = CWallet::Create (*node.chain , * node.coinjoin_loader , " " , std::move (database), options.create_flags , error, warnings);
56
56
wallet->postInitProcess ();
57
57
return wallet;
58
58
}
@@ -97,7 +97,7 @@ BOOST_FIXTURE_TEST_CASE(scan_for_wallet_transactions, TestChain100Setup)
97
97
98
98
// Verify ScanForWalletTransactions fails to read an unknown start block.
99
99
{
100
- CWallet wallet (m_node.chain .get (), m_node.coinjoin_loader , " " , CreateDummyWalletDatabase ());
100
+ CWallet wallet (m_node.chain .get (), m_node.coinjoin_loader . get () , " " , CreateDummyWalletDatabase ());
101
101
wallet.SetupLegacyScriptPubKeyMan ();
102
102
{
103
103
LOCK (wallet.cs_wallet );
@@ -117,7 +117,7 @@ BOOST_FIXTURE_TEST_CASE(scan_for_wallet_transactions, TestChain100Setup)
117
117
// Verify ScanForWalletTransactions picks up transactions in both the old
118
118
// and new block files.
119
119
{
120
- CWallet wallet (m_node.chain .get (), m_node.coinjoin_loader , " " , CreateDummyWalletDatabase ());
120
+ CWallet wallet (m_node.chain .get (), m_node.coinjoin_loader . get () , " " , CreateDummyWalletDatabase ());
121
121
{
122
122
LOCK (wallet.cs_wallet );
123
123
wallet.SetLastBlockProcessed (::ChainActive ().Height (), ::ChainActive ().Tip ()->GetBlockHash ());
@@ -143,7 +143,7 @@ BOOST_FIXTURE_TEST_CASE(scan_for_wallet_transactions, TestChain100Setup)
143
143
// Verify ScanForWalletTransactions only picks transactions in the new block
144
144
// file.
145
145
{
146
- CWallet wallet (m_node.chain .get (), m_node.coinjoin_loader , " " , CreateDummyWalletDatabase ());
146
+ CWallet wallet (m_node.chain .get (), m_node.coinjoin_loader . get () , " " , CreateDummyWalletDatabase ());
147
147
{
148
148
LOCK (wallet.cs_wallet );
149
149
wallet.SetLastBlockProcessed (::ChainActive ().Height (), ::ChainActive ().Tip ()->GetBlockHash ());
@@ -168,7 +168,7 @@ BOOST_FIXTURE_TEST_CASE(scan_for_wallet_transactions, TestChain100Setup)
168
168
169
169
// Verify ScanForWalletTransactions scans no blocks.
170
170
{
171
- CWallet wallet (m_node.chain .get (), m_node.coinjoin_loader , " " , CreateDummyWalletDatabase ());
171
+ CWallet wallet (m_node.chain .get (), m_node.coinjoin_loader . get () , " " , CreateDummyWalletDatabase ());
172
172
{
173
173
LOCK (wallet.cs_wallet );
174
174
wallet.SetLastBlockProcessed (::ChainActive ().Height (), ::ChainActive ().Tip ()->GetBlockHash ());
@@ -204,7 +204,7 @@ BOOST_FIXTURE_TEST_CASE(importmulti_rescan, TestChain100Setup)
204
204
// before the missing block, and success for a key whose creation time is
205
205
// after.
206
206
{
207
- std::shared_ptr<CWallet> wallet = std::make_shared<CWallet>(m_node.chain .get (), m_node.coinjoin_loader , " " , CreateDummyWalletDatabase ());
207
+ std::shared_ptr<CWallet> wallet = std::make_shared<CWallet>(m_node.chain .get (), m_node.coinjoin_loader . get () , " " , CreateDummyWalletDatabase ());
208
208
wallet->SetupLegacyScriptPubKeyMan ();
209
209
WITH_LOCK (wallet->cs_wallet , wallet->SetLastBlockProcessed (newTip->nHeight , newTip->GetBlockHash ()));
210
210
AddWallet (wallet);
@@ -266,7 +266,7 @@ BOOST_FIXTURE_TEST_CASE(importwallet_rescan, TestChain100Setup)
266
266
267
267
// Import key into wallet and call dumpwallet to create backup file.
268
268
{
269
- std::shared_ptr<CWallet> wallet = std::make_shared<CWallet>(m_node.chain .get (), m_node.coinjoin_loader , " " , CreateDummyWalletDatabase ());
269
+ std::shared_ptr<CWallet> wallet = std::make_shared<CWallet>(m_node.chain .get (), m_node.coinjoin_loader . get () , " " , CreateDummyWalletDatabase ());
270
270
{
271
271
auto spk_man = wallet->GetOrCreateLegacyScriptPubKeyMan ();
272
272
LOCK2 (wallet->cs_wallet , spk_man->cs_KeyStore );
@@ -289,7 +289,7 @@ BOOST_FIXTURE_TEST_CASE(importwallet_rescan, TestChain100Setup)
289
289
// Call importwallet RPC and verify all blocks with timestamps >= BLOCK_TIME
290
290
// were scanned, and no prior blocks were scanned.
291
291
{
292
- std::shared_ptr<CWallet> wallet = std::make_shared<CWallet>(m_node.chain .get (), m_node.coinjoin_loader , " " , CreateDummyWalletDatabase ());
292
+ std::shared_ptr<CWallet> wallet = std::make_shared<CWallet>(m_node.chain .get (), m_node.coinjoin_loader . get () , " " , CreateDummyWalletDatabase ());
293
293
LOCK (wallet->cs_wallet );
294
294
wallet->SetupLegacyScriptPubKeyMan ();
295
295
@@ -317,7 +317,7 @@ BOOST_FIXTURE_TEST_CASE(importwallet_rescan, TestChain100Setup)
317
317
// Verify getaddressinfo RPC produces more or less expected results
318
318
BOOST_FIXTURE_TEST_CASE (rpc_getaddressinfo, TestChain100Setup)
319
319
{
320
- std::shared_ptr<CWallet> wallet = std::make_shared<CWallet>(m_node.chain .get (), m_node.coinjoin_loader , " " , CreateMockWalletDatabase ());
320
+ std::shared_ptr<CWallet> wallet = std::make_shared<CWallet>(m_node.chain .get (), m_node.coinjoin_loader . get () , " " , CreateMockWalletDatabase ());
321
321
wallet->SetupLegacyScriptPubKeyMan ();
322
322
AddWallet (wallet);
323
323
CoreContext context{m_node};
@@ -398,7 +398,7 @@ BOOST_FIXTURE_TEST_CASE(rpc_getaddressinfo, TestChain100Setup)
398
398
// debit functions.
399
399
BOOST_FIXTURE_TEST_CASE (coin_mark_dirty_immature_credit, TestChain100Setup)
400
400
{
401
- CWallet wallet (m_node.chain .get (), m_node.coinjoin_loader , " " , CreateDummyWalletDatabase ());
401
+ CWallet wallet (m_node.chain .get (), m_node.coinjoin_loader . get () , " " , CreateDummyWalletDatabase ());
402
402
auto spk_man = wallet.GetOrCreateLegacyScriptPubKeyMan ();
403
403
CWalletTx wtx (&wallet, m_coinbase_txns.back ());
404
404
@@ -573,7 +573,7 @@ class ListCoinsTestingSetup : public TestChain100Setup
573
573
ListCoinsTestingSetup ()
574
574
{
575
575
CreateAndProcessBlock ({}, GetScriptForRawPubKey (coinbaseKey.GetPubKey ()));
576
- wallet = std::make_unique<CWallet>(m_node.chain .get (), m_node.coinjoin_loader , " " , CreateMockWalletDatabase ());
576
+ wallet = std::make_unique<CWallet>(m_node.chain .get (), m_node.coinjoin_loader . get () , " " , CreateMockWalletDatabase ());
577
577
{
578
578
LOCK (wallet->cs_wallet );
579
579
wallet->SetLastBlockProcessed (::ChainActive ().Height (), ::ChainActive ().Tip ()->GetBlockHash ());
@@ -710,7 +710,7 @@ class CreateTransactionTestSetup : public TestChain100Setup
710
710
CreateTransactionTestSetup ()
711
711
{
712
712
CreateAndProcessBlock ({}, GetScriptForRawPubKey (coinbaseKey.GetPubKey ()));
713
- wallet = std::make_unique<CWallet>(m_node.chain .get (), m_node.coinjoin_loader , " " , CreateMockWalletDatabase ());
713
+ wallet = std::make_unique<CWallet>(m_node.chain .get (), m_node.coinjoin_loader . get () , " " , CreateMockWalletDatabase ());
714
714
bool firstRun;
715
715
wallet->LoadWallet (firstRun);
716
716
AddWallet (wallet);
@@ -1191,7 +1191,7 @@ BOOST_FIXTURE_TEST_CASE(wallet_disableprivkeys, TestChain100Setup)
1191
1191
node.fee_estimator = std::make_unique<CBlockPolicyEstimator>();
1192
1192
node.mempool = std::make_unique<CTxMemPool>(node.fee_estimator .get ());
1193
1193
auto chain = interfaces::MakeChain (node);
1194
- std::shared_ptr<CWallet> wallet = std::make_shared<CWallet>(chain.get (), m_node.coinjoin_loader , " " , CreateDummyWalletDatabase ());
1194
+ std::shared_ptr<CWallet> wallet = std::make_shared<CWallet>(chain.get (), m_node.coinjoin_loader . get () , " " , CreateDummyWalletDatabase ());
1195
1195
wallet->SetupLegacyScriptPubKeyMan ();
1196
1196
wallet->SetMinVersion (FEATURE_LATEST);
1197
1197
wallet->SetWalletFlag (WALLET_FLAG_DISABLE_PRIVATE_KEYS);
0 commit comments