diff --git a/dash-spv/src/sync/filters/manager.rs b/dash-spv/src/sync/filters/manager.rs index f91bdeeba..50969a9f5 100644 --- a/dash-spv/src/sync/filters/manager.rs +++ b/dash-spv/src/sync/filters/manager.rs @@ -149,7 +149,6 @@ impl SyncResult> { debug_assert!(self.is_idle(), "manager should have no in-flight state on start"); - self.set_state(SyncState::Syncing); // Use filter_committed_height for restart recovery instead of // synced_height, which advances per-block and may exceed committed scan progress. let (wallet_birth_height, wallet_committed_height) = { @@ -184,7 +183,10 @@ impl { + // Transition back to Syncing so is_synced() returns false + // until all new filters and matched blocks are fully processed. + if self.state() == SyncState::Synced { + self.set_state(SyncState::Syncing); + } + self.filter_pipeline.extend_target(tip_height); { let header_storage = self.header_storage.read().await; self.filter_pipeline.send_pending(requests, &*header_storage).await?; } - if self.state() == SyncState::Synced && self.active_batches.is_empty() { + if self.active_batches.is_empty() { tracing::debug!("Processing new filter (target: {})", tip_height); return self.try_create_lookahead_batches().await; } @@ -755,13 +765,14 @@ impl