Skip to content

Commit 73dddb9

Browse files
fix: improve error handling in filter header sync
- Updated the error handling in the filter header synchronization process to return a more informative `SyncError` when no available headers are found between specified heights. - This change enhances the clarity of error reporting, aiding in debugging and improving the overall robustness of the synchronization logic.
1 parent ba8bbb6 commit 73dddb9

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

dash-spv/src/sync/filters.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -602,7 +602,11 @@ impl<S: StorageManager + Send + Sync + 'static, N: NetworkManager + Send + Sync
602602
"This indicates a serious storage inconsistency. Stopping filter header sync."
603603
);
604604
self.syncing_filter_headers = false;
605-
return Ok(false);
605+
return Err(SyncError::Storage(format!(
606+
"No available headers found between {} and {} while selecting next batch stop hash",
607+
min_height,
608+
next_batch_end_height
609+
)));
606610
}
607611
}
608612
}

0 commit comments

Comments
 (0)