diff options
| author | DanConwayDev <DanConwayDev@protonmail.com> | 2026-01-09 22:02:33 +0000 |
|---|---|---|
| committer | DanConwayDev <DanConwayDev@protonmail.com> | 2026-01-09 22:02:33 +0000 |
| commit | f90e32fc4cf9049d0ea12d10bfa3aa45a8706846 (patch) | |
| tree | cfdc27679a45fe08e6023dfd40abb8a305e4e203 /src/sync/mod.rs | |
| parent | 1079db274ed97fc84f7a6ca756707e5fa30cd3c9 (diff) | |
feat: add helpful feedback after bootstrap relay sync completes
When bootstrap sync completes with zero announcements, users may not
know if this is expected or indicates a configuration problem (wrong
domain or wrong bootstrap relay).
Changes:
- Add INFO-level message after bootstrap announcement sync completes
- If zero announcements: suggest verifying domain/relay configuration
- If announcements found: report count for user awareness
- Only applies to bootstrap relay (is_bootstrap flag)
This helps users quickly diagnose configuration issues during initial
setup and testing.
Discovered via production sync testing against wss://git.shakespeare.diy
Diffstat (limited to 'src/sync/mod.rs')
| -rw-r--r-- | src/sync/mod.rs | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/sync/mod.rs b/src/sync/mod.rs index 6437ee1..70f9dd7 100644 --- a/src/sync/mod.rs +++ b/src/sync/mod.rs | |||
| @@ -973,6 +973,25 @@ impl SyncManager { | |||
| 973 | sync_method = ?sync_method, | 973 | sync_method = ?sync_method, |
| 974 | "Generic filter (announcements) historic sync complete - announcements_synced set to true" | 974 | "Generic filter (announcements) historic sync complete - announcements_synced set to true" |
| 975 | ); | 975 | ); |
| 976 | |||
| 977 | // Provide helpful feedback for bootstrap relay | ||
| 978 | if state.is_bootstrap { | ||
| 979 | let announcement_count = events_count; | ||
| 980 | if announcement_count == 0 { | ||
| 981 | tracing::info!( | ||
| 982 | relay = %relay_url, | ||
| 983 | domain = %self.config.domain, | ||
| 984 | "Bootstrap sync found no announcements for domain - verify domain is correct or try different bootstrap relay" | ||
| 985 | ); | ||
| 986 | } else { | ||
| 987 | tracing::info!( | ||
| 988 | relay = %relay_url, | ||
| 989 | domain = %self.config.domain, | ||
| 990 | announcement_count, | ||
| 991 | "Bootstrap sync discovered announcements for domain" | ||
| 992 | ); | ||
| 993 | } | ||
| 994 | } | ||
| 976 | } | 995 | } |
| 977 | 996 | ||
| 978 | // Track if this batch failed (for ConnectedDegraded transition) | 997 | // Track if this batch failed (for ConnectedDegraded transition) |