From b8982f5bf14b1f7c44d35b78bc33ee7d20d65a41 Mon Sep 17 00:00:00 2001 From: M1nd3r Date: Mon, 3 Feb 2025 12:12:45 +0100 Subject: [PATCH] chore(core): remove deprecated methods from cache_thp [no changelog] --- core/src/storage/cache_thp.py | 20 -------------------- 1 file changed, 20 deletions(-) diff --git a/core/src/storage/cache_thp.py b/core/src/storage/cache_thp.py index 183d8832f9..1fe7b7ae7e 100644 --- a/core/src/storage/cache_thp.py +++ b/core/src/storage/cache_thp.py @@ -288,26 +288,6 @@ def get_next_channel_id() -> bytes: return cid_counter.to_bytes(_CHANNEL_ID_LENGTH, "big") -def _deprecated_get_next_session_id(channel: ChannelCache) -> bytes: - while True: - if channel.session_id_counter >= 255: - channel.session_id_counter = 1 - else: - channel.session_id_counter += 1 - if _deprecated_is_session_id_unique(channel): - break - new_sid = channel.session_id_counter - return new_sid.to_bytes(SESSION_ID_LENGTH, "big") - - -def _deprecated_is_session_id_unique(channel: ChannelCache) -> bool: - for session in _SESSIONS: - if session.channel_id == channel.channel_id: - if session.session_id == channel.session_id_counter: - return False - return True - - def _is_cid_unique() -> bool: global cid_counter cid_counter_bytes = cid_counter.to_bytes(_CHANNEL_ID_LENGTH, "big")