From bd477a406d6b410b37db6e97c149f8a0f29f37fc Mon Sep 17 00:00:00 2001 From: Claude Date: Sat, 10 Oct 2026 07:24:49 +0000 Subject: [PATCH] apollo_integration_tests: delete dead code (unsure, review carefully) Delete two unused `pub` convenience methods from `IntegrationTestManager`: `await_txs_accepted_on_all_running_nodes` and `get_num_accepted_txs_on_all_running_nodes`, plus the now-unused `monitoring_utils::await_txs_accepted` import they left behind. Both are `_on_all_running_nodes` wrappers over still-used methods/helpers (`perform_action_on_all_running_nodes` + `await_txs_accepted`, and `get_num_accepted_txs_on_running_nodes(get_running_node_indices())` respectively); the wrapped items retain other live callers, so removal is self-contained. Neither method has any caller anywhere in the sequencer workspace (all `tests/`/`benches/`/`src/bin/*` included) or in the sibling repos sequencer-devops and starkware, and both predate the repo's shallow history window (unused for >2 months, not fresh scaffolding). Marked "unsure, review carefully": this is a test-harness library whose `pub` API is a reusable toolbox, so these wrappers may be intentionally kept for future or out-of-tree test authors even without current callers. A maintainer should confirm they are not intended as kept public test-API before merging. Verified: rust_fmt clean; `cargo build -p apollo_integration_tests` and `cargo clippy -p apollo_integration_tests --all-targets` both finish with zero dead_code/unused warnings (clippy covers lib + bins + tests, i.e. both cfgs). The `--tests` full link and the test run are environmentally infeasible here (linking ~15 full-node-stack test binaries exhausts the session disk; tests need a live multi-node network); removing uncalled methods cannot change test behavior. Co-Authored-By: Claude Opus 4.8 (1M context) Claude-Session: https://claude.ai/code/session_01AHduHDPL9JJPafP1GJxHWL --- .../src/integration_test_manager.rs | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/crates/apollo_integration_tests/src/integration_test_manager.rs b/crates/apollo_integration_tests/src/integration_test_manager.rs index 2bbb2c4b541..7ae5d359e71 100644 --- a/crates/apollo_integration_tests/src/integration_test_manager.rs +++ b/crates/apollo_integration_tests/src/integration_test_manager.rs @@ -54,7 +54,6 @@ use crate::monitoring_utils::{ await_batcher_block, await_block, await_sync_block, - await_txs_accepted, get_consensus_decisions_reached, sequencer_num_accepted_txs, verify_txs_accepted, @@ -751,14 +750,6 @@ impl IntegrationTestManager { self.rpc_verify_class_declared(BLOCK_TO_WAIT_FOR_DECLARE).await; } - pub async fn await_txs_accepted_on_all_running_nodes(&mut self, target_n_txs: usize) { - self.perform_action_on_all_running_nodes(|running_node| { - let monitoring_client = running_node.node_setup.state_sync_monitoring_client(); - await_txs_accepted(monitoring_client, running_node.get_node_index(), target_n_txs) - }) - .await; - } - /// This function tests and verifies the integration of the transaction flow. /// /// # Parameters @@ -1042,11 +1033,6 @@ impl IntegrationTestManager { .await } - /// This function returns the number of accepted transactions on all running nodes. - pub async fn get_num_accepted_txs_on_all_running_nodes(&self) -> HashMap { - self.get_num_accepted_txs_on_running_nodes(&self.get_running_node_indices()).await - } - pub async fn assert_no_reverted_txs_on_all_running_nodes(&self) { self.perform_action_on_all_running_nodes(|running_node| async move { let sequencer_idx = running_node.get_node_index();