From da58e559865e128ca47571645a7d0e60f9caf317 Mon Sep 17 00:00:00 2001 From: Hennadii Stepanov <32963518+hebasto@users.noreply.github.com> Date: Thu, 6 Aug 2026 12:20:24 +0100 Subject: [PATCH 1/8] test, refactor: Remove unused `warnings` in `wallet/test/util.cpp` These have been unused since the following commits: - c61d3f02f5122b38ea8bf0029aa9dfbbf38e10d0 - e12ff8aca049ec7b054cb3047a167c7ce8dbd421 --- src/wallet/test/util.cpp | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/wallet/test/util.cpp b/src/wallet/test/util.cpp index 19281be63bd..f51f11492d7 100644 --- a/src/wallet/test/util.cpp +++ b/src/wallet/test/util.cpp @@ -67,7 +67,6 @@ std::shared_ptr TestCreateWallet(WalletContext& context) options.create_flags = WALLET_FLAG_DESCRIPTORS; DatabaseStatus status; bilingual_str error; - std::vector warnings; auto database = MakeWalletDatabase("", options, status, error); return TestCreateWallet(std::move(database), context, options.create_flags); } @@ -91,7 +90,6 @@ std::shared_ptr TestLoadWallet(WalletContext& context) options.require_existing = true; DatabaseStatus status; bilingual_str error; - std::vector warnings; auto database = MakeWalletDatabase("", options, status, error); return TestLoadWallet(std::move(database), context); } From fc28914de4e1251be7087e2a0cfa5b8fd3b0f0b9 Mon Sep 17 00:00:00 2001 From: Hennadii Stepanov <32963518+hebasto@users.noreply.github.com> Date: Thu, 6 Aug 2026 12:20:52 +0100 Subject: [PATCH 2/8] fuzz, refactor: Remove unused `linearization` in `cluster_linearize.cpp` This has been unused since a52b53926b5c6a5b92255435e3c204cdf18665a2. --- src/test/fuzz/cluster_linearize.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/src/test/fuzz/cluster_linearize.cpp b/src/test/fuzz/cluster_linearize.cpp index 5e0e30a4a8d..85456004a22 100644 --- a/src/test/fuzz/cluster_linearize.cpp +++ b/src/test/fuzz/cluster_linearize.cpp @@ -611,7 +611,6 @@ FUZZ_TARGET(clusterlin_components) // Construct a depgraph. SpanReader reader(buffer); DepGraph depgraph; - std::vector linearization; try { reader >> Using(depgraph); } catch (const std::ios_base::failure&) {} From 3df0d067ade9574ef70e96f048f6178fb34f38f1 Mon Sep 17 00:00:00 2001 From: Hennadii Stepanov <32963518+hebasto@users.noreply.github.com> Date: Thu, 6 Aug 2026 12:21:27 +0100 Subject: [PATCH 3/8] fuzz, refactor: Remove unused `random_string` in `locale.cpp` This has been unused since 33332829333b589420f8038541d04ec6970f051d. --- src/test/fuzz/locale.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/src/test/fuzz/locale.cpp b/src/test/fuzz/locale.cpp index 0336f77a7ed..15c050a4990 100644 --- a/src/test/fuzz/locale.cpp +++ b/src/test/fuzz/locale.cpp @@ -45,7 +45,6 @@ FUZZ_TARGET(locale) const char* c_locale = std::setlocale(LC_ALL, "C"); assert(c_locale != nullptr); - const std::string random_string = fuzzed_data_provider.ConsumeRandomLengthString(5); const int64_t random_int64 = fuzzed_data_provider.ConsumeIntegral(); const std::string tostring_without_locale = util::ToString(random_int64); const std::string strprintf_int_without_locale = strprintf("%d", random_int64); From b7ae50e2e27eb10414a8a2b327fee95e3db3cddc Mon Sep 17 00:00:00 2001 From: Hennadii Stepanov <32963518+hebasto@users.noreply.github.com> Date: Thu, 6 Aug 2026 12:21:37 +0100 Subject: [PATCH 4/8] fuzz, refactor: Remove unused `header` in `p2p_transport_serialization.cpp` This has been unused since 0de48fe858a1ffcced340eef2c849165216141c8. --- src/test/fuzz/p2p_transport_serialization.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/src/test/fuzz/p2p_transport_serialization.cpp b/src/test/fuzz/p2p_transport_serialization.cpp index e457d93cd1f..80a1781de27 100644 --- a/src/test/fuzz/p2p_transport_serialization.cpp +++ b/src/test/fuzz/p2p_transport_serialization.cpp @@ -86,7 +86,6 @@ FUZZ_TARGET(p2p_transport_serialization, .init = initialize_p2p_transport_serial assert(msg.m_raw_message_size == CMessageHeader::HEADER_SIZE + msg.m_message_size); assert(msg.m_time == time); - std::vector header; auto msg2 = NetMsg::Make(msg.m_type, std::span{msg.m_recv}); bool queued = send_transport.SetMessageToSend(msg2); assert(queued); From e50f422d25f98cc83d1d2251eca4e134be5453bd Mon Sep 17 00:00:00 2001 From: Hennadii Stepanov <32963518+hebasto@users.noreply.github.com> Date: Thu, 6 Aug 2026 12:21:47 +0100 Subject: [PATCH 5/8] test, refactor: Remove unused variables in `test/rbf_tests.cpp` These have been unused since the following commits: - c320cddb1b57a9c9911054fc440f7a12aaea61b5 - e9c5aeb11d641b8cae373452339760809625021d - 216e6937290338950215795291dbf0a533e234cf --- src/test/rbf_tests.cpp | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/test/rbf_tests.cpp b/src/test/rbf_tests.cpp index e2a95148e4d..15134791eb5 100644 --- a/src/test/rbf_tests.cpp +++ b/src/test/rbf_tests.cpp @@ -121,11 +121,6 @@ BOOST_FIXTURE_TEST_CASE(rbf_helper_functions, TestChain100Setup) BOOST_CHECK_EQUAL(entry8_high->GetFee(), high_fee); CTxMemPool::setEntries set_12_normal{entry1_normal, entry2_normal}; - CTxMemPool::setEntries set_34_cpfp{entry3_low, entry4_high}; - CTxMemPool::setEntries set_56_low{entry5_low, entry6_low_prioritised}; - CTxMemPool::setEntries set_78_high{entry7_high, entry8_high}; - CTxMemPool::setEntries all_entries{entry1_normal, entry2_normal, entry3_low, entry4_high, - entry5_low, entry6_low_prioritised, entry7_high, entry8_high}; CTxMemPool::setEntries empty_set; const auto unused_txid = Txid::FromUint256(GetRandHash()); From e550945a3941e31c8a31983fdce29c11e584bea1 Mon Sep 17 00:00:00 2001 From: Hennadii Stepanov <32963518+hebasto@users.noreply.github.com> Date: Thu, 6 Aug 2026 14:17:50 +0100 Subject: [PATCH 6/8] test, refactor: Remove unused `removed_refs` in `txgraph_tests.cpp` This has been unused since it was introduced in 938e86f8fecd65ca90b97e6cf896f8c59fb590ba. --- src/test/txgraph_tests.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/test/txgraph_tests.cpp b/src/test/txgraph_tests.cpp index 444e2185f36..d29eb725a9e 100644 --- a/src/test/txgraph_tests.cpp +++ b/src/test/txgraph_tests.cpp @@ -290,7 +290,7 @@ BOOST_AUTO_TEST_CASE(txgraph_trim_big_singletons) BOOST_CHECK(graph->IsOversized(TxGraph::Level::TOP)); // Call Trim() to remove transactions and bring the cluster back within limits. - auto removed_refs = graph->Trim(); + graph->Trim(); graph->SanityCheck(); BOOST_CHECK_EQUAL(graph->GetTransactionCount(TxGraph::Level::TOP), NUM_TOTAL_TX - 6); BOOST_CHECK(!graph->IsOversized(TxGraph::Level::TOP)); From 422f1bd92f15c35d8fa799d25889e2fcb7469a44 Mon Sep 17 00:00:00 2001 From: Hennadii Stepanov <32963518+hebasto@users.noreply.github.com> Date: Thu, 6 Aug 2026 12:33:57 +0100 Subject: [PATCH 7/8] test, refactor: Remove unused `utxo_pool` in `coinselector_tests.cpp` This has been unused since d610951c154663053a0e39a850dffd96f808581b. --- src/wallet/test/coinselector_tests.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/src/wallet/test/coinselector_tests.cpp b/src/wallet/test/coinselector_tests.cpp index dee4b05c645..fdce22a2327 100644 --- a/src/wallet/test/coinselector_tests.cpp +++ b/src/wallet/test/coinselector_tests.cpp @@ -169,7 +169,6 @@ BOOST_AUTO_TEST_CASE(bnb_search_test) { FastRandomContext rand{}; // Setup - std::vector utxo_pool; SelectionResult expected_result(CAmount(0), SelectionAlgorithm::BNB); size_t expected_attempts; From 3175d576288f3118c6fee0d9f7cb57f976c52346 Mon Sep 17 00:00:00 2001 From: Hennadii Stepanov <32963518+hebasto@users.noreply.github.com> Date: Thu, 6 Aug 2026 12:40:27 +0100 Subject: [PATCH 8/8] test, refactor: Remove unused `error` in `wallet_tests.cpp` This has been unused since 3b98bf9c43ece060d57d7ae31624d4a8220de266. --- src/wallet/test/wallet_tests.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/src/wallet/test/wallet_tests.cpp b/src/wallet/test/wallet_tests.cpp index c7ce9553bee..1c3047727db 100644 --- a/src/wallet/test/wallet_tests.cpp +++ b/src/wallet/test/wallet_tests.cpp @@ -728,7 +728,6 @@ BOOST_FIXTURE_TEST_CASE(RemoveTxs, TestChain100Setup) CKey key = GenerateRandomKey(); AddKey(*wallet, key); - std::string error; m_coinbase_txns.push_back(CreateAndProcessBlock({}, GetScriptForRawPubKey(coinbaseKey.GetPubKey())).vtx[0]); auto block_tx = TestSimpleSpend(*m_coinbase_txns[0], 0, coinbaseKey, GetScriptForRawPubKey(key.GetPubKey())); CreateAndProcessBlock({block_tx}, GetScriptForRawPubKey(coinbaseKey.GetPubKey()));