Skip to content

Commit c31a565

Browse files
committed
chore: Drop unused sync code
1 parent 4e9ef04 commit c31a565

37 files changed

+18
-8034
lines changed

dash-spv/src/client/config.rs

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -78,9 +78,6 @@ pub struct ClientConfig {
7878
/// Maximum concurrent filter requests (default: 8).
7979
pub max_concurrent_filter_requests: usize,
8080

81-
/// Enable flow control for filter requests (default: true).
82-
pub enable_filter_flow_control: bool,
83-
8481
/// Delay between filter requests in milliseconds (default: 50).
8582
pub filter_request_delay_ms: u64,
8683

@@ -159,9 +156,6 @@ pub struct ClientConfig {
159156
/// Maximum concurrent CFHeaders requests for parallel sync (default: 50).
160157
pub max_concurrent_cfheaders_requests_parallel: usize,
161158

162-
/// Enable flow control for CFHeaders requests (default: true).
163-
pub enable_cfheaders_flow_control: bool,
164-
165159
/// Timeout for CFHeaders requests in seconds (default: 30).
166160
pub cfheaders_request_timeout_secs: u64,
167161

@@ -210,7 +204,6 @@ impl Default for ClientConfig {
210204
log_level: "info".to_string(),
211205
user_agent: None,
212206
max_concurrent_filter_requests: 16,
213-
enable_filter_flow_control: true,
214207
filter_request_delay_ms: 0,
215208
enable_cfheader_gap_restart: true,
216209
cfheader_gap_check_interval_secs: 15,
@@ -243,7 +236,6 @@ impl Default for ClientConfig {
243236
wallet_creation_time: None,
244237
// CFHeaders flow control defaults
245238
max_concurrent_cfheaders_requests_parallel: 50,
246-
enable_cfheaders_flow_control: true,
247239
cfheaders_request_timeout_secs: 30,
248240
max_cfheaders_retries: 3,
249241
// QRInfo defaults (simplified per plan)
@@ -341,12 +333,6 @@ impl ClientConfig {
341333
self
342334
}
343335

344-
/// Enable or disable filter flow control.
345-
pub fn with_filter_flow_control(mut self, enabled: bool) -> Self {
346-
self.enable_filter_flow_control = enabled;
347-
self
348-
}
349-
350336
/// Set delay between filter requests.
351337
pub fn with_filter_request_delay(mut self, delay_ms: u64) -> Self {
352338
self.filter_request_delay_ms = delay_ms;

dash-spv/src/client/config_test.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ mod tests {
2828
assert!(config.enable_persistence);
2929
assert_eq!(config.log_level, "info");
3030
assert_eq!(config.max_concurrent_filter_requests, 16);
31-
assert!(config.enable_filter_flow_control);
3231
assert_eq!(config.filter_request_delay_ms, 0);
3332

3433
// Mempool defaults
@@ -66,7 +65,6 @@ mod tests {
6665
.with_connection_timeout(Duration::from_secs(10))
6766
.with_log_level("debug")
6867
.with_max_concurrent_filter_requests(32)
69-
.with_filter_flow_control(false)
7068
.with_filter_request_delay(100)
7169
.with_mempool_tracking(MempoolStrategy::BloomFilter)
7270
.with_max_mempool_transactions(500)
@@ -80,7 +78,6 @@ mod tests {
8078
assert_eq!(config.connection_timeout, Duration::from_secs(10));
8179
assert_eq!(config.log_level, "debug");
8280
assert_eq!(config.max_concurrent_filter_requests, 32);
83-
assert!(!config.enable_filter_flow_control);
8481
assert_eq!(config.filter_request_delay_ms, 100);
8582

8683
// Mempool settings

dash-spv/src/client/filter_sync.rs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -161,10 +161,13 @@ impl<
161161
.await
162162
.map_err(SpvError::Sync)?;
163163

164-
let (pending_count, active_count, flow_enabled) =
164+
let (pending_count, active_count) =
165165
self.sync_manager.filter_sync().get_flow_control_status();
166-
tracing::info!("✅ Filter sync with flow control initiated (flow control enabled: {}, {} requests queued, {} active)",
167-
flow_enabled, pending_count, active_count);
166+
tracing::info!(
167+
"✅ Filter sync initiated ({} requests queued, {} active)",
168+
pending_count,
169+
active_count
170+
);
168171

169172
Ok(())
170173
}

dash-spv/src/client/mod.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
//! - `core.rs` - Core DashSpvClient struct definition and simple accessors
88
//! - `lifecycle.rs` - Client lifecycle (new, start, stop, shutdown)
99
//! - `events.rs` - Event emission and progress tracking receivers
10-
//! - `progress.rs` - Sync progress calculation and reporting
1110
//! - `mempool.rs` - Mempool tracking and coordination
1211
//! - `queries.rs` - Peer, masternode, and balance queries
1312
//! - `transactions.rs` - Transaction operations (e.g., broadcast)
@@ -54,7 +53,6 @@ mod transactions;
5453
// Re-export public types from extracted modules
5554
pub use block_processor::{BlockProcessingTask, BlockProcessor};
5655
pub use config::ClientConfig;
57-
pub use filter_sync::FilterSyncCoordinator;
5856
pub use message_handler::MessageHandler;
5957
pub use status_display::StatusDisplay;
6058

dash-spv/src/network/tests.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,9 @@ mod peer_network_manager_tests {
2727
max_peers: 3,
2828
enable_persistence: false,
2929
log_level: "info".to_string(),
30-
enable_filter_flow_control: true,
3130
filter_request_delay_ms: 0,
3231
max_concurrent_filter_requests: 50,
3332
max_concurrent_cfheaders_requests_parallel: 50,
34-
enable_cfheaders_flow_control: true,
3533
cfheaders_request_timeout_secs: 30,
3634
max_cfheaders_retries: 3,
3735
enable_cfheader_gap_restart: true,

0 commit comments

Comments
 (0)