Alisher 9f8361930d fix(filter): suppress health-check pings in background mode
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>
2026-06-03 08:09:40 +02:00
..
2025-04-11 17:56:37 +03:00