@@ -35,7 +35,7 @@ typedef set<pair<const CWalletTx*,unsigned int> > CoinSet;
35
35
36
36
BOOST_FIXTURE_TEST_SUITE (wallet_tests, WalletTestingSetup)
37
37
38
- static const CWallet wallet ;
38
+ static const CWallet testWallet ;
39
39
static vector<COutput> vCoins;
40
40
41
41
static void add_coin (const CAmount& nValue, int nAge = 6 *24 , bool fIsFromMe = false , int nInput=0 )
@@ -50,7 +50,7 @@ static void add_coin(const CAmount& nValue, int nAge = 6*24, bool fIsFromMe = fa
50
50
// so stop vin being empty, and cache a non-zero Debit to fake out IsFromMe()
51
51
tx.vin .resize (1 );
52
52
}
53
- std::unique_ptr<CWalletTx> wtx (new CWalletTx (&wallet , MakeTransactionRef (std::move (tx))));
53
+ std::unique_ptr<CWalletTx> wtx (new CWalletTx (&testWallet , MakeTransactionRef (std::move (tx))));
54
54
if (fIsFromMe )
55
55
{
56
56
wtx->fDebitCached = true ;
@@ -78,32 +78,32 @@ BOOST_AUTO_TEST_CASE(coin_selection_tests)
78
78
CoinSet setCoinsRet, setCoinsRet2;
79
79
CAmount nValueRet;
80
80
81
- LOCK (wallet .cs_wallet );
81
+ LOCK (testWallet .cs_wallet );
82
82
83
83
// test multiple times to allow for differences in the shuffle order
84
84
for (int i = 0 ; i < RUN_TESTS; i++)
85
85
{
86
86
empty_wallet ();
87
87
88
88
// with an empty wallet we can't even pay one cent
89
- BOOST_CHECK (!wallet .SelectCoinsMinConf ( 1 * CENT, 1 , 6 , 0 , vCoins, setCoinsRet, nValueRet));
89
+ BOOST_CHECK (!testWallet .SelectCoinsMinConf ( 1 * CENT, 1 , 6 , 0 , vCoins, setCoinsRet, nValueRet));
90
90
91
91
add_coin (1 *CENT, 4 ); // add a new 1 cent coin
92
92
93
93
// with a new 1 cent coin, we still can't find a mature 1 cent
94
- BOOST_CHECK (!wallet .SelectCoinsMinConf ( 1 * CENT, 1 , 6 , 0 , vCoins, setCoinsRet, nValueRet));
94
+ BOOST_CHECK (!testWallet .SelectCoinsMinConf ( 1 * CENT, 1 , 6 , 0 , vCoins, setCoinsRet, nValueRet));
95
95
96
96
// but we can find a new 1 cent
97
- BOOST_CHECK ( wallet .SelectCoinsMinConf ( 1 * CENT, 1 , 1 , 0 , vCoins, setCoinsRet, nValueRet));
97
+ BOOST_CHECK ( testWallet .SelectCoinsMinConf ( 1 * CENT, 1 , 1 , 0 , vCoins, setCoinsRet, nValueRet));
98
98
BOOST_CHECK_EQUAL (nValueRet, 1 * CENT);
99
99
100
100
add_coin (2 *CENT); // add a mature 2 cent coin
101
101
102
102
// we can't make 3 cents of mature coins
103
- BOOST_CHECK (!wallet .SelectCoinsMinConf ( 3 * CENT, 1 , 6 , 0 , vCoins, setCoinsRet, nValueRet));
103
+ BOOST_CHECK (!testWallet .SelectCoinsMinConf ( 3 * CENT, 1 , 6 , 0 , vCoins, setCoinsRet, nValueRet));
104
104
105
105
// we can make 3 cents of new coins
106
- BOOST_CHECK ( wallet .SelectCoinsMinConf ( 3 * CENT, 1 , 1 , 0 , vCoins, setCoinsRet, nValueRet));
106
+ BOOST_CHECK ( testWallet .SelectCoinsMinConf ( 3 * CENT, 1 , 1 , 0 , vCoins, setCoinsRet, nValueRet));
107
107
BOOST_CHECK_EQUAL (nValueRet, 3 * CENT);
108
108
109
109
add_coin (5 *CENT); // add a mature 5 cent coin,
@@ -113,33 +113,33 @@ BOOST_AUTO_TEST_CASE(coin_selection_tests)
113
113
// now we have new: 1+10=11 (of which 10 was self-sent), and mature: 2+5+20=27. total = 38
114
114
115
115
// we can't make 38 cents only if we disallow new coins:
116
- BOOST_CHECK (!wallet .SelectCoinsMinConf (38 * CENT, 1 , 6 , 0 , vCoins, setCoinsRet, nValueRet));
116
+ BOOST_CHECK (!testWallet .SelectCoinsMinConf (38 * CENT, 1 , 6 , 0 , vCoins, setCoinsRet, nValueRet));
117
117
// we can't even make 37 cents if we don't allow new coins even if they're from us
118
- BOOST_CHECK (!wallet .SelectCoinsMinConf (38 * CENT, 6 , 6 , 0 , vCoins, setCoinsRet, nValueRet));
118
+ BOOST_CHECK (!testWallet .SelectCoinsMinConf (38 * CENT, 6 , 6 , 0 , vCoins, setCoinsRet, nValueRet));
119
119
// but we can make 37 cents if we accept new coins from ourself
120
- BOOST_CHECK ( wallet .SelectCoinsMinConf (37 * CENT, 1 , 6 , 0 , vCoins, setCoinsRet, nValueRet));
120
+ BOOST_CHECK ( testWallet .SelectCoinsMinConf (37 * CENT, 1 , 6 , 0 , vCoins, setCoinsRet, nValueRet));
121
121
BOOST_CHECK_EQUAL (nValueRet, 37 * CENT);
122
122
// and we can make 38 cents if we accept all new coins
123
- BOOST_CHECK ( wallet .SelectCoinsMinConf (38 * CENT, 1 , 1 , 0 , vCoins, setCoinsRet, nValueRet));
123
+ BOOST_CHECK ( testWallet .SelectCoinsMinConf (38 * CENT, 1 , 1 , 0 , vCoins, setCoinsRet, nValueRet));
124
124
BOOST_CHECK_EQUAL (nValueRet, 38 * CENT);
125
125
126
126
// try making 34 cents from 1,2,5,10,20 - we can't do it exactly
127
- BOOST_CHECK ( wallet .SelectCoinsMinConf (34 * CENT, 1 , 1 , 0 , vCoins, setCoinsRet, nValueRet));
127
+ BOOST_CHECK ( testWallet .SelectCoinsMinConf (34 * CENT, 1 , 1 , 0 , vCoins, setCoinsRet, nValueRet));
128
128
BOOST_CHECK_EQUAL (nValueRet, 35 * CENT); // but 35 cents is closest
129
129
BOOST_CHECK_EQUAL (setCoinsRet.size (), 3U ); // the best should be 20+10+5. it's incredibly unlikely the 1 or 2 got included (but possible)
130
130
131
131
// when we try making 7 cents, the smaller coins (1,2,5) are enough. We should see just 2+5
132
- BOOST_CHECK ( wallet .SelectCoinsMinConf ( 7 * CENT, 1 , 1 , 0 , vCoins, setCoinsRet, nValueRet));
132
+ BOOST_CHECK ( testWallet .SelectCoinsMinConf ( 7 * CENT, 1 , 1 , 0 , vCoins, setCoinsRet, nValueRet));
133
133
BOOST_CHECK_EQUAL (nValueRet, 7 * CENT);
134
134
BOOST_CHECK_EQUAL (setCoinsRet.size (), 2U );
135
135
136
136
// when we try making 8 cents, the smaller coins (1,2,5) are exactly enough.
137
- BOOST_CHECK ( wallet .SelectCoinsMinConf ( 8 * CENT, 1 , 1 , 0 , vCoins, setCoinsRet, nValueRet));
137
+ BOOST_CHECK ( testWallet .SelectCoinsMinConf ( 8 * CENT, 1 , 1 , 0 , vCoins, setCoinsRet, nValueRet));
138
138
BOOST_CHECK (nValueRet == 8 * CENT);
139
139
BOOST_CHECK_EQUAL (setCoinsRet.size (), 3U );
140
140
141
141
// when we try making 9 cents, no subset of smaller coins is enough, and we get the next bigger coin (10)
142
- BOOST_CHECK ( wallet .SelectCoinsMinConf ( 9 * CENT, 1 , 1 , 0 , vCoins, setCoinsRet, nValueRet));
142
+ BOOST_CHECK ( testWallet .SelectCoinsMinConf ( 9 * CENT, 1 , 1 , 0 , vCoins, setCoinsRet, nValueRet));
143
143
BOOST_CHECK_EQUAL (nValueRet, 10 * CENT);
144
144
BOOST_CHECK_EQUAL (setCoinsRet.size (), 1U );
145
145
@@ -153,30 +153,30 @@ BOOST_AUTO_TEST_CASE(coin_selection_tests)
153
153
add_coin (30 *CENT); // now we have 6+7+8+20+30 = 71 cents total
154
154
155
155
// check that we have 71 and not 72
156
- BOOST_CHECK ( wallet .SelectCoinsMinConf (71 * CENT, 1 , 1 , 0 , vCoins, setCoinsRet, nValueRet));
157
- BOOST_CHECK (!wallet .SelectCoinsMinConf (72 * CENT, 1 , 1 , 0 , vCoins, setCoinsRet, nValueRet));
156
+ BOOST_CHECK ( testWallet .SelectCoinsMinConf (71 * CENT, 1 , 1 , 0 , vCoins, setCoinsRet, nValueRet));
157
+ BOOST_CHECK (!testWallet .SelectCoinsMinConf (72 * CENT, 1 , 1 , 0 , vCoins, setCoinsRet, nValueRet));
158
158
159
159
// now try making 16 cents. the best smaller coins can do is 6+7+8 = 21; not as good at the next biggest coin, 20
160
- BOOST_CHECK ( wallet .SelectCoinsMinConf (16 * CENT, 1 , 1 , 0 , vCoins, setCoinsRet, nValueRet));
160
+ BOOST_CHECK ( testWallet .SelectCoinsMinConf (16 * CENT, 1 , 1 , 0 , vCoins, setCoinsRet, nValueRet));
161
161
BOOST_CHECK_EQUAL (nValueRet, 20 * CENT); // we should get 20 in one coin
162
162
BOOST_CHECK_EQUAL (setCoinsRet.size (), 1U );
163
163
164
164
add_coin ( 5 *CENT); // now we have 5+6+7+8+20+30 = 75 cents total
165
165
166
166
// now if we try making 16 cents again, the smaller coins can make 5+6+7 = 18 cents, better than the next biggest coin, 20
167
- BOOST_CHECK ( wallet .SelectCoinsMinConf (16 * CENT, 1 , 1 , 0 , vCoins, setCoinsRet, nValueRet));
167
+ BOOST_CHECK ( testWallet .SelectCoinsMinConf (16 * CENT, 1 , 1 , 0 , vCoins, setCoinsRet, nValueRet));
168
168
BOOST_CHECK_EQUAL (nValueRet, 18 * CENT); // we should get 18 in 3 coins
169
169
BOOST_CHECK_EQUAL (setCoinsRet.size (), 3U );
170
170
171
171
add_coin ( 18 *CENT); // now we have 5+6+7+8+18+20+30
172
172
173
173
// and now if we try making 16 cents again, the smaller coins can make 5+6+7 = 18 cents, the same as the next biggest coin, 18
174
- BOOST_CHECK ( wallet .SelectCoinsMinConf (16 * CENT, 1 , 1 , 0 , vCoins, setCoinsRet, nValueRet));
174
+ BOOST_CHECK ( testWallet .SelectCoinsMinConf (16 * CENT, 1 , 1 , 0 , vCoins, setCoinsRet, nValueRet));
175
175
BOOST_CHECK_EQUAL (nValueRet, 18 * CENT); // we should get 18 in 1 coin
176
176
BOOST_CHECK_EQUAL (setCoinsRet.size (), 1U ); // because in the event of a tie, the biggest coin wins
177
177
178
178
// now try making 11 cents. we should get 5+6
179
- BOOST_CHECK ( wallet .SelectCoinsMinConf (11 * CENT, 1 , 1 , 0 , vCoins, setCoinsRet, nValueRet));
179
+ BOOST_CHECK ( testWallet .SelectCoinsMinConf (11 * CENT, 1 , 1 , 0 , vCoins, setCoinsRet, nValueRet));
180
180
BOOST_CHECK_EQUAL (nValueRet, 11 * CENT);
181
181
BOOST_CHECK_EQUAL (setCoinsRet.size (), 2U );
182
182
@@ -185,11 +185,11 @@ BOOST_AUTO_TEST_CASE(coin_selection_tests)
185
185
add_coin ( 2 *COIN);
186
186
add_coin ( 3 *COIN);
187
187
add_coin ( 4 *COIN); // now we have 5+6+7+8+18+20+30+100+200+300+400 = 1094 cents
188
- BOOST_CHECK ( wallet .SelectCoinsMinConf (95 * CENT, 1 , 1 , 0 , vCoins, setCoinsRet, nValueRet));
188
+ BOOST_CHECK ( testWallet .SelectCoinsMinConf (95 * CENT, 1 , 1 , 0 , vCoins, setCoinsRet, nValueRet));
189
189
BOOST_CHECK_EQUAL (nValueRet, 1 * COIN); // we should get 1 BTC in 1 coin
190
190
BOOST_CHECK_EQUAL (setCoinsRet.size (), 1U );
191
191
192
- BOOST_CHECK ( wallet .SelectCoinsMinConf (195 * CENT, 1 , 1 , 0 , vCoins, setCoinsRet, nValueRet));
192
+ BOOST_CHECK ( testWallet .SelectCoinsMinConf (195 * CENT, 1 , 1 , 0 , vCoins, setCoinsRet, nValueRet));
193
193
BOOST_CHECK_EQUAL (nValueRet, 2 * COIN); // we should get 2 BTC in 1 coin
194
194
BOOST_CHECK_EQUAL (setCoinsRet.size (), 1U );
195
195
@@ -204,22 +204,22 @@ BOOST_AUTO_TEST_CASE(coin_selection_tests)
204
204
205
205
// try making 1 * MIN_CHANGE from the 1.5 * MIN_CHANGE
206
206
// we'll get change smaller than MIN_CHANGE whatever happens, so can expect MIN_CHANGE exactly
207
- BOOST_CHECK ( wallet .SelectCoinsMinConf (MIN_CHANGE, 1 , 1 , 0 , vCoins, setCoinsRet, nValueRet));
207
+ BOOST_CHECK ( testWallet .SelectCoinsMinConf (MIN_CHANGE, 1 , 1 , 0 , vCoins, setCoinsRet, nValueRet));
208
208
BOOST_CHECK_EQUAL (nValueRet, MIN_CHANGE);
209
209
210
210
// but if we add a bigger coin, small change is avoided
211
211
add_coin (1111 *MIN_CHANGE);
212
212
213
213
// try making 1 from 0.1 + 0.2 + 0.3 + 0.4 + 0.5 + 1111 = 1112.5
214
- BOOST_CHECK ( wallet .SelectCoinsMinConf (1 * MIN_CHANGE, 1 , 1 , 0 , vCoins, setCoinsRet, nValueRet));
214
+ BOOST_CHECK ( testWallet .SelectCoinsMinConf (1 * MIN_CHANGE, 1 , 1 , 0 , vCoins, setCoinsRet, nValueRet));
215
215
BOOST_CHECK_EQUAL (nValueRet, 1 * MIN_CHANGE); // we should get the exact amount
216
216
217
217
// if we add more small coins:
218
218
add_coin (MIN_CHANGE * 6 / 10 );
219
219
add_coin (MIN_CHANGE * 7 / 10 );
220
220
221
221
// and try again to make 1.0 * MIN_CHANGE
222
- BOOST_CHECK ( wallet .SelectCoinsMinConf (1 * MIN_CHANGE, 1 , 1 , 0 , vCoins, setCoinsRet, nValueRet));
222
+ BOOST_CHECK ( testWallet .SelectCoinsMinConf (1 * MIN_CHANGE, 1 , 1 , 0 , vCoins, setCoinsRet, nValueRet));
223
223
BOOST_CHECK_EQUAL (nValueRet, 1 * MIN_CHANGE); // we should get the exact amount
224
224
225
225
// run the 'mtgox' test (see http://blockexplorer.com/tx/29a3efd3ef04f9153d47a990bd7b048a4b2d213daaa5fb8ed670fb85f13bdbcf)
@@ -228,7 +228,7 @@ BOOST_AUTO_TEST_CASE(coin_selection_tests)
228
228
for (int j = 0 ; j < 20 ; j++)
229
229
add_coin (50000 * COIN);
230
230
231
- BOOST_CHECK ( wallet .SelectCoinsMinConf (500000 * COIN, 1 , 1 , 0 , vCoins, setCoinsRet, nValueRet));
231
+ BOOST_CHECK ( testWallet .SelectCoinsMinConf (500000 * COIN, 1 , 1 , 0 , vCoins, setCoinsRet, nValueRet));
232
232
BOOST_CHECK_EQUAL (nValueRet, 500000 * COIN); // we should get the exact amount
233
233
BOOST_CHECK_EQUAL (setCoinsRet.size (), 10U ); // in ten coins
234
234
@@ -241,7 +241,7 @@ BOOST_AUTO_TEST_CASE(coin_selection_tests)
241
241
add_coin (MIN_CHANGE * 6 / 10 );
242
242
add_coin (MIN_CHANGE * 7 / 10 );
243
243
add_coin (1111 * MIN_CHANGE);
244
- BOOST_CHECK ( wallet .SelectCoinsMinConf (1 * MIN_CHANGE, 1 , 1 , 0 , vCoins, setCoinsRet, nValueRet));
244
+ BOOST_CHECK ( testWallet .SelectCoinsMinConf (1 * MIN_CHANGE, 1 , 1 , 0 , vCoins, setCoinsRet, nValueRet));
245
245
BOOST_CHECK_EQUAL (nValueRet, 1111 * MIN_CHANGE); // we get the bigger coin
246
246
BOOST_CHECK_EQUAL (setCoinsRet.size (), 1U );
247
247
@@ -251,7 +251,7 @@ BOOST_AUTO_TEST_CASE(coin_selection_tests)
251
251
add_coin (MIN_CHANGE * 6 / 10 );
252
252
add_coin (MIN_CHANGE * 8 / 10 );
253
253
add_coin (1111 * MIN_CHANGE);
254
- BOOST_CHECK ( wallet .SelectCoinsMinConf (MIN_CHANGE, 1 , 1 , 0 , vCoins, setCoinsRet, nValueRet));
254
+ BOOST_CHECK ( testWallet .SelectCoinsMinConf (MIN_CHANGE, 1 , 1 , 0 , vCoins, setCoinsRet, nValueRet));
255
255
BOOST_CHECK_EQUAL (nValueRet, MIN_CHANGE); // we should get the exact amount
256
256
BOOST_CHECK_EQUAL (setCoinsRet.size (), 2U ); // in two coins 0.4+0.6
257
257
@@ -262,12 +262,12 @@ BOOST_AUTO_TEST_CASE(coin_selection_tests)
262
262
add_coin (MIN_CHANGE * 100 );
263
263
264
264
// trying to make 100.01 from these three coins
265
- BOOST_CHECK (wallet .SelectCoinsMinConf (MIN_CHANGE * 10001 / 100 , 1 , 1 , 0 , vCoins, setCoinsRet, nValueRet));
265
+ BOOST_CHECK (testWallet .SelectCoinsMinConf (MIN_CHANGE * 10001 / 100 , 1 , 1 , 0 , vCoins, setCoinsRet, nValueRet));
266
266
BOOST_CHECK_EQUAL (nValueRet, MIN_CHANGE * 10105 / 100 ); // we should get all coins
267
267
BOOST_CHECK_EQUAL (setCoinsRet.size (), 3U );
268
268
269
269
// but if we try to make 99.9, we should take the bigger of the two small coins to avoid small change
270
- BOOST_CHECK (wallet .SelectCoinsMinConf (MIN_CHANGE * 9990 / 100 , 1 , 1 , 0 , vCoins, setCoinsRet, nValueRet));
270
+ BOOST_CHECK (testWallet .SelectCoinsMinConf (MIN_CHANGE * 9990 / 100 , 1 , 1 , 0 , vCoins, setCoinsRet, nValueRet));
271
271
BOOST_CHECK_EQUAL (nValueRet, 101 * MIN_CHANGE);
272
272
BOOST_CHECK_EQUAL (setCoinsRet.size (), 2U );
273
273
@@ -277,7 +277,7 @@ BOOST_AUTO_TEST_CASE(coin_selection_tests)
277
277
// Create 676 inputs (= (old MAX_STANDARD_TX_SIZE == 100000) / 148 bytes per input)
278
278
for (uint16_t j = 0 ; j < 676 ; j++)
279
279
add_coin (amt);
280
- BOOST_CHECK (wallet .SelectCoinsMinConf (2000 , 1 , 1 , 0 , vCoins, setCoinsRet, nValueRet));
280
+ BOOST_CHECK (testWallet .SelectCoinsMinConf (2000 , 1 , 1 , 0 , vCoins, setCoinsRet, nValueRet));
281
281
if (amt - 2000 < MIN_CHANGE) {
282
282
// needs more than one input:
283
283
uint16_t returnSize = std::ceil ((2000.0 + MIN_CHANGE)/amt);
@@ -299,17 +299,17 @@ BOOST_AUTO_TEST_CASE(coin_selection_tests)
299
299
300
300
// picking 50 from 100 coins doesn't depend on the shuffle,
301
301
// but does depend on randomness in the stochastic approximation code
302
- BOOST_CHECK (wallet .SelectCoinsMinConf (50 * COIN, 1 , 6 , 0 , vCoins, setCoinsRet , nValueRet));
303
- BOOST_CHECK (wallet .SelectCoinsMinConf (50 * COIN, 1 , 6 , 0 , vCoins, setCoinsRet2, nValueRet));
302
+ BOOST_CHECK (testWallet .SelectCoinsMinConf (50 * COIN, 1 , 6 , 0 , vCoins, setCoinsRet , nValueRet));
303
+ BOOST_CHECK (testWallet .SelectCoinsMinConf (50 * COIN, 1 , 6 , 0 , vCoins, setCoinsRet2, nValueRet));
304
304
BOOST_CHECK (!equal_sets (setCoinsRet, setCoinsRet2));
305
305
306
306
int fails = 0 ;
307
307
for (int j = 0 ; j < RANDOM_REPEATS; j++)
308
308
{
309
309
// selecting 1 from 100 identical coins depends on the shuffle; this test will fail 1% of the time
310
310
// run the test RANDOM_REPEATS times and only complain if all of them fail
311
- BOOST_CHECK (wallet .SelectCoinsMinConf (COIN, 1 , 6 , 0 , vCoins, setCoinsRet , nValueRet));
312
- BOOST_CHECK (wallet .SelectCoinsMinConf (COIN, 1 , 6 , 0 , vCoins, setCoinsRet2, nValueRet));
311
+ BOOST_CHECK (testWallet .SelectCoinsMinConf (COIN, 1 , 6 , 0 , vCoins, setCoinsRet , nValueRet));
312
+ BOOST_CHECK (testWallet .SelectCoinsMinConf (COIN, 1 , 6 , 0 , vCoins, setCoinsRet2, nValueRet));
313
313
if (equal_sets (setCoinsRet, setCoinsRet2))
314
314
fails++;
315
315
}
@@ -329,8 +329,8 @@ BOOST_AUTO_TEST_CASE(coin_selection_tests)
329
329
{
330
330
// selecting 1 from 100 identical coins depends on the shuffle; this test will fail 1% of the time
331
331
// run the test RANDOM_REPEATS times and only complain if all of them fail
332
- BOOST_CHECK (wallet .SelectCoinsMinConf (90 *CENT, 1 , 6 , 0 , vCoins, setCoinsRet , nValueRet));
333
- BOOST_CHECK (wallet .SelectCoinsMinConf (90 *CENT, 1 , 6 , 0 , vCoins, setCoinsRet2, nValueRet));
332
+ BOOST_CHECK (testWallet .SelectCoinsMinConf (90 *CENT, 1 , 6 , 0 , vCoins, setCoinsRet , nValueRet));
333
+ BOOST_CHECK (testWallet .SelectCoinsMinConf (90 *CENT, 1 , 6 , 0 , vCoins, setCoinsRet2, nValueRet));
334
334
if (equal_sets (setCoinsRet, setCoinsRet2))
335
335
fails++;
336
336
}
@@ -345,7 +345,7 @@ BOOST_AUTO_TEST_CASE(ApproximateBestSubset)
345
345
CoinSet setCoinsRet;
346
346
CAmount nValueRet;
347
347
348
- LOCK (wallet .cs_wallet );
348
+ LOCK (testWallet .cs_wallet );
349
349
350
350
empty_wallet ();
351
351
@@ -354,7 +354,7 @@ BOOST_AUTO_TEST_CASE(ApproximateBestSubset)
354
354
add_coin (1000 * COIN);
355
355
add_coin (3 * COIN);
356
356
357
- BOOST_CHECK (wallet .SelectCoinsMinConf (1003 * COIN, 1 , 6 , 0 , vCoins, setCoinsRet, nValueRet));
357
+ BOOST_CHECK (testWallet .SelectCoinsMinConf (1003 * COIN, 1 , 6 , 0 , vCoins, setCoinsRet, nValueRet));
358
358
BOOST_CHECK_EQUAL (nValueRet, 1003 * COIN);
359
359
BOOST_CHECK_EQUAL (setCoinsRet.size (), 2U );
360
360
0 commit comments