Use set to reduce iterations

This commit is contained in:
Matthias
2024-02-22 05:55:05 +01:00
committed by Joe Schr
parent b9f361b33c
commit 392d5ae09a
+1 -1
View File
@@ -2312,7 +2312,7 @@ class Exchange:
Should only be used for pairlists which need "on time" expirarion, and no longer cache. Should only be used for pairlists which need "on time" expirarion, and no longer cache.
""" """
timeframes = [p[1] for p in pairs] timeframes = {p[1] for p in pairs}
for timeframe in timeframes: for timeframe in timeframes:
if timeframe not in self._expiring_candle_cache: if timeframe not in self._expiring_candle_cache:
timeframe_in_sec = timeframe_to_seconds(timeframe) timeframe_in_sec = timeframe_to_seconds(timeframe)