3
3
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
4
4
5
5
#include " wallet/wallet.h"
6
- #include " wallet/walletdb.h"
7
6
8
7
#include " wallet/test/wallet_test_fixture.h"
9
8
@@ -17,7 +16,7 @@ extern CWallet* pwalletMain;
17
16
BOOST_FIXTURE_TEST_SUITE (accounting_tests, WalletTestingSetup)
18
17
19
18
static void
20
- GetResults(CWalletDB& walletdb, std::map<CAmount, CAccountingEntry>& results)
19
+ GetResults(std::map<CAmount, CAccountingEntry>& results)
21
20
{
22
21
std::list<CAccountingEntry> aes;
23
22
@@ -32,7 +31,6 @@ GetResults(CWalletDB& walletdb, std::map<CAmount, CAccountingEntry>& results)
32
31
33
32
BOOST_AUTO_TEST_CASE (acc_orderupgrade)
34
33
{
35
- CWalletDB walletdb (pwalletMain->strWalletFile );
36
34
std::vector<CWalletTx*> vpwtx;
37
35
CWalletTx wtx;
38
36
CAccountingEntry ae;
@@ -57,7 +55,7 @@ BOOST_AUTO_TEST_CASE(acc_orderupgrade)
57
55
ae.strOtherAccount = " c" ;
58
56
pwalletMain->AddAccountingEntry (ae);
59
57
60
- GetResults (walletdb, results);
58
+ GetResults (results);
61
59
62
60
BOOST_CHECK (pwalletMain->nOrderPosNext == 3 );
63
61
BOOST_CHECK (2 == results.size ());
@@ -73,7 +71,7 @@ BOOST_AUTO_TEST_CASE(acc_orderupgrade)
73
71
ae.nOrderPos = pwalletMain->IncOrderPosNext ();
74
72
pwalletMain->AddAccountingEntry (ae);
75
73
76
- GetResults (walletdb, results);
74
+ GetResults (results);
77
75
78
76
BOOST_CHECK (results.size () == 3 );
79
77
BOOST_CHECK (pwalletMain->nOrderPosNext == 4 );
@@ -105,7 +103,7 @@ BOOST_AUTO_TEST_CASE(acc_orderupgrade)
105
103
vpwtx[2 ]->nTimeReceived = (unsigned int )1333333329 ;
106
104
vpwtx[2 ]->nOrderPos = -1 ;
107
105
108
- GetResults (walletdb, results);
106
+ GetResults (results);
109
107
110
108
BOOST_CHECK (results.size () == 3 );
111
109
BOOST_CHECK (pwalletMain->nOrderPosNext == 6 );
@@ -123,7 +121,7 @@ BOOST_AUTO_TEST_CASE(acc_orderupgrade)
123
121
ae.nOrderPos = -1 ;
124
122
pwalletMain->AddAccountingEntry (ae);
125
123
126
- GetResults (walletdb, results);
124
+ GetResults (results);
127
125
128
126
BOOST_CHECK (results.size () == 4 );
129
127
BOOST_CHECK (pwalletMain->nOrderPosNext == 7 );
0 commit comments