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)
3737 LOCK (wallet.cs_wallet );
3838
3939 while (state.KeepRunning ()) {
40- // Empty wallet.
41- for (COutput output : vCoins)
42- delete output.tx ;
43- vCoins.clear ();
44-
4540 // Add coins.
4641 for (int i = 0 ; i < 1000 ; i++)
4742 addCoin (1000 * COIN, wallet, vCoins);
@@ -53,6 +48,12 @@ static void CoinSelection(benchmark::State& state)
5348 assert (success);
5449 assert (nValueRet == 1003 * COIN);
5550 assert (setCoinsRet.size () == 2 );
51+
52+ // Empty wallet.
53+ for (COutput& output : vCoins) {
54+ delete output.tx ;
55+ }
56+ vCoins.clear ();
5657 }
5758}
5859
Original file line number Diff line number Diff line change @@ -406,11 +406,11 @@ BOOST_AUTO_TEST_CASE(test_CheckQueueControl_Locks)
406406 boost::thread_group tg;
407407 std::mutex m;
408408 std::condition_variable cv;
409+ bool has_lock{false };
410+ bool has_tried{false };
411+ bool done{false };
412+ bool done_ack{false };
409413 {
410- bool has_lock {false };
411- bool has_tried {false };
412- bool done {false };
413- bool done_ack {false };
414414 std::unique_lock<std::mutex> l (m);
415415 tg.create_thread ([&]{
416416 CCheckQueueControl<FakeCheck> control (queue.get ());
Original file line number Diff line number Diff line change @@ -28,6 +28,9 @@ void CConnmanTest::AddNode(CNode& node)
2828void CConnmanTest::ClearNodes ()
2929{
3030 LOCK (g_connman->cs_vNodes );
31+ for (CNode* node : g_connman->vNodes ) {
32+ delete node;
33+ }
3134 g_connman->vNodes .clear ();
3235}
3336
You can’t perform that action at this time.
0 commit comments