File tree Expand file tree Collapse file tree 3 files changed +13
-9
lines changed Expand file tree Collapse file tree 3 files changed +13
-9
lines changed Original file line number Diff line number Diff line change @@ -37,11 +37,6 @@ static void CoinSelection(benchmark::State& state)
37
37
LOCK (wallet.cs_wallet );
38
38
39
39
while (state.KeepRunning ()) {
40
- // Empty wallet.
41
- for (COutput output : vCoins)
42
- delete output.tx ;
43
- vCoins.clear ();
44
-
45
40
// Add coins.
46
41
for (int i = 0 ; i < 1000 ; i++)
47
42
addCoin (1000 * COIN, wallet, vCoins);
@@ -53,6 +48,12 @@ static void CoinSelection(benchmark::State& state)
53
48
assert (success);
54
49
assert (nValueRet == 1003 * COIN);
55
50
assert (setCoinsRet.size () == 2 );
51
+
52
+ // Empty wallet.
53
+ for (COutput& output : vCoins) {
54
+ delete output.tx ;
55
+ }
56
+ vCoins.clear ();
56
57
}
57
58
}
58
59
Original file line number Diff line number Diff line change @@ -406,11 +406,11 @@ BOOST_AUTO_TEST_CASE(test_CheckQueueControl_Locks)
406
406
boost::thread_group tg;
407
407
std::mutex m;
408
408
std::condition_variable cv;
409
+ bool has_lock{false };
410
+ bool has_tried{false };
411
+ bool done{false };
412
+ bool done_ack{false };
409
413
{
410
- bool has_lock {false };
411
- bool has_tried {false };
412
- bool done {false };
413
- bool done_ack {false };
414
414
std::unique_lock<std::mutex> l (m);
415
415
tg.create_thread ([&]{
416
416
CCheckQueueControl<FakeCheck> control (queue.get ());
Original file line number Diff line number Diff line change @@ -28,6 +28,9 @@ void CConnmanTest::AddNode(CNode& node)
28
28
void CConnmanTest::ClearNodes ()
29
29
{
30
30
LOCK (g_connman->cs_vNodes );
31
+ for (CNode* node : g_connman->vNodes ) {
32
+ delete node;
33
+ }
31
34
g_connman->vNodes .clear ();
32
35
}
33
36
You can’t perform that action at this time.
0 commit comments