DHT bugfix: failures tracking should be bound to 2048 LRU cache size

This commit is contained in:
Victor Shyba 2021-12-10 03:04:55 -03:00
parent 7df02303b2
commit f586de2bbe

View file

@ -29,7 +29,7 @@ class PeerManager:
self._loop = loop self._loop = loop
self._rpc_failures: typing.Dict[ self._rpc_failures: typing.Dict[
typing.Tuple[str, int], typing.Tuple[typing.Optional[float], typing.Optional[float]] 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_replied: typing.Dict[typing.Tuple[str, int], float] = LRUCache(2048)
self._last_sent: 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) self._last_requested: typing.Dict[typing.Tuple[str, int], float] = LRUCache(2048)