mirror of
https://github.com/PR0M3TH3AN/bitvid.git
synced 2026-10-27 16:02:26 +00:00
Replaces the per-video live report subscription (one pool.sub per visible video × ~20 relays, re-fired on every reconnect — the ~1000 REQ/s storm) with ONE batched SubscriptionManager subscription over the whole active id set, updated in place as the set changes. Backfill fetches history only for newly-added ids (one batched list()). Unchanged sets are a no-op (dedup guard). MODERATION_REPORT_SUBS_ENABLED flipped back on. Trusted-mute subs were already batched-by-author, so the relay cap + contact-loop fix already tamed them. Legacy per-id path retained only for SubscriptionManager-less environments (unit tests / mock clients). All 39 moderation tests pass; new cheat-resistant batching test added; nip07-heat shows reports no longer storm (steady idle). Co-Authored-By: Claude Opus 4.8 <[email protected]>