Chrysostomos Nanakos 86ce276a90
fix(blockexchange): cleanup stale lastSentWants entries to prevent memory leak
Stale entries in peer.lastSentWants were not removed when blocks were
resolved or cancelled, causing unbounded memory growth. This adds
incremental cleanup during refreshBlockKnowledge, removing up to 2048
stale entries per refresh cycle with proper event loop yielding.

Part of https://github.com/codex-storage/nim-codex/issues/974

Signed-off-by: Chrysostomos Nanakos <chris@include.gr>
2025-11-03 16:49:31 +02:00
..
2024-08-26 13:18:59 +00:00