File tree Expand file tree Collapse file tree 2 files changed +36
-7
lines changed
Expand file tree Collapse file tree 2 files changed +36
-7
lines changed Original file line number Diff line number Diff line change @@ -185,8 +185,11 @@ impl<
185185 self . transition_to_next_phase ( storage, network, "No blocks to download" ) . await ?;
186186 }
187187
188- _ => {
189- // Idle or FullySynced - nothing to execute
188+ SyncPhase :: Idle
189+ | SyncPhase :: FullySynced {
190+ ..
191+ } => {
192+ // Nothing to execute
190193 }
191194 }
192195
@@ -422,7 +425,15 @@ impl<
422425 }
423426 }
424427 }
425- _ => { }
428+ SyncPhase :: Idle
429+ | SyncPhase :: FullySynced {
430+ ..
431+ }
432+ | SyncPhase :: DownloadingBlocks {
433+ ..
434+ } => {
435+ // Nothing to execute
436+ }
426437 }
427438
428439 Ok ( ( ) )
@@ -467,7 +478,16 @@ impl<
467478 } => {
468479 self . filter_sync . check_cfheader_request_timeouts ( network, storage) . await ?;
469480 }
470- _ => {
481+ SyncPhase :: Idle
482+ | SyncPhase :: DownloadingFilters {
483+ ..
484+ }
485+ | SyncPhase :: DownloadingBlocks {
486+ ..
487+ }
488+ | SyncPhase :: FullySynced {
489+ ..
490+ } => {
471491 // For other phases, we'll need phase-specific recovery
472492 }
473493 }
Original file line number Diff line number Diff line change @@ -170,7 +170,10 @@ impl SyncPhase {
170170 last_progress,
171171 ..
172172 } => Some ( * last_progress) ,
173- _ => None ,
173+ SyncPhase :: Idle
174+ | SyncPhase :: FullySynced {
175+ ..
176+ } => None ,
174177 }
175178 }
176179
@@ -198,7 +201,10 @@ impl SyncPhase {
198201 last_progress,
199202 ..
200203 } => * last_progress = now,
201- _ => { }
204+ SyncPhase :: Idle
205+ | SyncPhase :: FullySynced {
206+ ..
207+ } => { }
202208 }
203209 }
204210}
@@ -421,7 +427,10 @@ impl SyncPhase {
421427 }
422428 }
423429
424- _ => PhaseProgress {
430+ SyncPhase :: Idle
431+ | SyncPhase :: FullySynced {
432+ ..
433+ } => PhaseProgress {
425434 phase_name : self . name ( ) ,
426435 items_completed : 0 ,
427436 items_total : None ,
You can’t perform that action at this time.
0 commit comments