mirror of
https://github.com/logos-messaging/logos-messaging-go.git
synced 2026-07-18 15:20:07 +00:00
FilterHealthCheckLoop fires every 1 min and sends a Waku protocol ping to each subscribed filter peer. On Android, these pings queue up during Doze and flush in maintenance windows (~15 min), keeping the LTE modem at ~55-58% duty cycle even when the app is backgrounded. This was the dominant radio wakeup source missed by the previous commit (which only gated subscription renewal in subscriptionLoop). mag's measurement on #21111 confirmed modem still 58% active post-R1. Add backgroundMode atomic.Bool to WakuFilterLightNode with a SetBackgroundMode(bool) method. FilterHealthCheckLoop skips PingPeers() when backgrounded. FilterManager.SetBackgroundMode now cascades to both layers: subscription renewal (api/filter) and health-check pings (protocol/filter). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>