mirror of
https://github.com/status-im/status-go.git
synced 2026-08-31 00:51:12 +00:00
Prepare status-go for the logos-delivery Messaging API's connection-status model (waku/api/types.nim ConnectionStatus): Disconnected / PartiallyConnected / Connected, where online == status != Disconnected. - Add ConnectionState enum in the waku layer, re-exported through pkg/messaging/types, and surface it on the Waku + messaging API interfaces (Waku.ConnectionState(), Transport.ConnectionState(), API.ConnectionStatus()). ConnStatus / ConnectionStatus now carry the three-state value. - Derive the state faithfully (mirroring calculateConnectionState): no peers -> Disconnected; relay mesh SufficientlyHealthy on every default shard -> Connected; peers but degraded mesh -> PartiallyConnected. This activates the previously no-op go-waku TopicHealth channel (supersedes #4628). Light nodes report Connected on any connectivity (no relay mesh; per-protocol health TBD). - Switch Online() to derive from ConnectionState (!= Disconnected) instead of raw peer count. Since Disconnected == zero peers, online detection is unchanged for the 8 Online() callers; the new states only subdivide 'online'. - Emit a new EventConnectionStatusChange host signal on state transitions (mirrors logos-delivery's connection-status-change; replaces the removed wakuv2.peerstats signal). - Keep Peers() (needed by the discovery functional tests). Issue: #7466 Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>