From 030e4075847d44d1b7d031b47f506a107b26a277 Mon Sep 17 00:00:00 2001 From: Victor Shyba Date: Fri, 10 Dec 2021 03:04:55 -0300 Subject: [PATCH] DHT bugfix: failures tracking should be bound to 2048 LRU cache size --- lbry/dht/peer.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lbry/dht/peer.py b/lbry/dht/peer.py index c69f5001c..5d29d3fc1 100644 --- a/lbry/dht/peer.py +++ b/lbry/dht/peer.py @@ -29,7 +29,7 @@ class PeerManager: self._loop = loop self._rpc_failures: typing.Dict[ typing.Tuple[str, int], typing.Tuple[typing.Optional[float], typing.Optional[float]] - ] = {} + ] = LRUCache(2048) self._last_replied: typing.Dict[typing.Tuple[str, int], float] = LRUCache(2048) self._last_sent: typing.Dict[typing.Tuple[str, int], float] = LRUCache(2048) self._last_requested: typing.Dict[typing.Tuple[str, int], float] = LRUCache(2048)