@@ -49,7 +49,7 @@ BOOST_FIXTURE_TEST_CASE(scan_for_wallet_transactions, TestChain100Setup)
49
49
50
50
// Verify ScanForWalletTransactions accommodates a null start block.
51
51
{
52
- CWallet wallet (* chain, WalletLocation (), WalletDatabase::CreateDummy ());
52
+ CWallet wallet (chain. get () , WalletLocation (), WalletDatabase::CreateDummy ());
53
53
AddKey (wallet, coinbaseKey);
54
54
WalletRescanReserver reserver (&wallet);
55
55
reserver.reserve ();
@@ -64,7 +64,7 @@ BOOST_FIXTURE_TEST_CASE(scan_for_wallet_transactions, TestChain100Setup)
64
64
// Verify ScanForWalletTransactions picks up transactions in both the old
65
65
// and new block files.
66
66
{
67
- CWallet wallet (* chain, WalletLocation (), WalletDatabase::CreateDummy ());
67
+ CWallet wallet (chain. get () , WalletLocation (), WalletDatabase::CreateDummy ());
68
68
AddKey (wallet, coinbaseKey);
69
69
WalletRescanReserver reserver (&wallet);
70
70
reserver.reserve ();
@@ -83,7 +83,7 @@ BOOST_FIXTURE_TEST_CASE(scan_for_wallet_transactions, TestChain100Setup)
83
83
// Verify ScanForWalletTransactions only picks transactions in the new block
84
84
// file.
85
85
{
86
- CWallet wallet (* chain, WalletLocation (), WalletDatabase::CreateDummy ());
86
+ CWallet wallet (chain. get () , WalletLocation (), WalletDatabase::CreateDummy ());
87
87
AddKey (wallet, coinbaseKey);
88
88
WalletRescanReserver reserver (&wallet);
89
89
reserver.reserve ();
@@ -101,7 +101,7 @@ BOOST_FIXTURE_TEST_CASE(scan_for_wallet_transactions, TestChain100Setup)
101
101
102
102
// Verify ScanForWalletTransactions scans no blocks.
103
103
{
104
- CWallet wallet (* chain, WalletLocation (), WalletDatabase::CreateDummy ());
104
+ CWallet wallet (chain. get () , WalletLocation (), WalletDatabase::CreateDummy ());
105
105
AddKey (wallet, coinbaseKey);
106
106
WalletRescanReserver reserver (&wallet);
107
107
reserver.reserve ();
@@ -135,7 +135,7 @@ BOOST_FIXTURE_TEST_CASE(importmulti_rescan, TestChain100Setup)
135
135
// before the missing block, and success for a key whose creation time is
136
136
// after.
137
137
{
138
- std::shared_ptr<CWallet> wallet = std::make_shared<CWallet>(* chain, WalletLocation (), WalletDatabase::CreateDummy ());
138
+ std::shared_ptr<CWallet> wallet = std::make_shared<CWallet>(chain. get () , WalletLocation (), WalletDatabase::CreateDummy ());
139
139
AddWallet (wallet);
140
140
UniValue keys;
141
141
keys.setArray ();
@@ -198,7 +198,7 @@ BOOST_FIXTURE_TEST_CASE(importwallet_rescan, TestChain100Setup)
198
198
199
199
// Import key into wallet and call dumpwallet to create backup file.
200
200
{
201
- std::shared_ptr<CWallet> wallet = std::make_shared<CWallet>(* chain, WalletLocation (), WalletDatabase::CreateDummy ());
201
+ std::shared_ptr<CWallet> wallet = std::make_shared<CWallet>(chain. get () , WalletLocation (), WalletDatabase::CreateDummy ());
202
202
LOCK (wallet->cs_wallet );
203
203
wallet->mapKeyMetadata [coinbaseKey.GetPubKey ().GetID ()].nCreateTime = KEY_TIME;
204
204
wallet->AddKeyPubKey (coinbaseKey, coinbaseKey.GetPubKey ());
@@ -214,7 +214,7 @@ BOOST_FIXTURE_TEST_CASE(importwallet_rescan, TestChain100Setup)
214
214
// Call importwallet RPC and verify all blocks with timestamps >= BLOCK_TIME
215
215
// were scanned, and no prior blocks were scanned.
216
216
{
217
- std::shared_ptr<CWallet> wallet = std::make_shared<CWallet>(* chain, WalletLocation (), WalletDatabase::CreateDummy ());
217
+ std::shared_ptr<CWallet> wallet = std::make_shared<CWallet>(chain. get () , WalletLocation (), WalletDatabase::CreateDummy ());
218
218
219
219
JSONRPCRequest request;
220
220
request.params .setArray ();
@@ -245,7 +245,7 @@ BOOST_FIXTURE_TEST_CASE(importwallet_rescan, TestChain100Setup)
245
245
BOOST_FIXTURE_TEST_CASE (coin_mark_dirty_immature_credit, TestChain100Setup)
246
246
{
247
247
auto chain = interfaces::MakeChain ();
248
- CWallet wallet (* chain, WalletLocation (), WalletDatabase::CreateDummy ());
248
+ CWallet wallet (chain. get () , WalletLocation (), WalletDatabase::CreateDummy ());
249
249
CWalletTx wtx (&wallet, m_coinbase_txns.back ());
250
250
auto locked_chain = chain->lock ();
251
251
LOCK (wallet.cs_wallet );
@@ -340,7 +340,7 @@ class ListCoinsTestingSetup : public TestChain100Setup
340
340
ListCoinsTestingSetup ()
341
341
{
342
342
CreateAndProcessBlock ({}, GetScriptForRawPubKey (coinbaseKey.GetPubKey ()));
343
- wallet = MakeUnique<CWallet>(* m_chain, WalletLocation (), WalletDatabase::CreateMock ());
343
+ wallet = MakeUnique<CWallet>(m_chain. get () , WalletLocation (), WalletDatabase::CreateMock ());
344
344
bool firstRun;
345
345
wallet->LoadWallet (firstRun);
346
346
AddKey (*wallet, coinbaseKey);
@@ -451,7 +451,7 @@ BOOST_FIXTURE_TEST_CASE(ListCoins, ListCoinsTestingSetup)
451
451
BOOST_FIXTURE_TEST_CASE (wallet_disableprivkeys, TestChain100Setup)
452
452
{
453
453
auto chain = interfaces::MakeChain ();
454
- std::shared_ptr<CWallet> wallet = std::make_shared<CWallet>(* chain, WalletLocation (), WalletDatabase::CreateDummy ());
454
+ std::shared_ptr<CWallet> wallet = std::make_shared<CWallet>(chain. get () , WalletLocation (), WalletDatabase::CreateDummy ());
455
455
wallet->SetMinVersion (FEATURE_LATEST);
456
456
wallet->SetWalletFlag (WALLET_FLAG_DISABLE_PRIVATE_KEYS);
457
457
BOOST_CHECK (!wallet->TopUpKeyPool (1000 ));
0 commit comments