From eae3ff7d50c7b288c3d4eb1089c5f4d31aa541e6 Mon Sep 17 00:00:00 2001 From: M1nd3r Date: Wed, 31 Jul 2024 14:56:47 +0200 Subject: [PATCH] refactor(core): rename channel creating function [no changelog] --- core/src/storage/cache_thp.py | 2 +- core/src/trezor/wire/thp/channel_manager.py | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/core/src/storage/cache_thp.py b/core/src/storage/cache_thp.py index 4f322a444..d03ceafdd 100644 --- a/core/src/storage/cache_thp.py +++ b/core/src/storage/cache_thp.py @@ -122,7 +122,7 @@ _usage_counter = 0 cid_counter: int = 4659 # TODO change to random value on start -def get_new_unauthenticated_channel(iface: bytes) -> ChannelCache: +def get_new_channel(iface: bytes) -> ChannelCache: if len(iface) != _WIRE_INTERFACE_LENGTH: raise Exception("Invalid WireInterface (encoded) length") diff --git a/core/src/trezor/wire/thp/channel_manager.py b/core/src/trezor/wire/thp/channel_manager.py index b0d2efc91..a48f6d7fd 100644 --- a/core/src/trezor/wire/thp/channel_manager.py +++ b/core/src/trezor/wire/thp/channel_manager.py @@ -14,9 +14,7 @@ def create_new_channel(iface: WireInterface, buffer: utils.BufferType) -> Channe """ Creates a new channel for the interface `iface` with the buffer `buffer`. """ - channel_cache = cache_thp.get_new_unauthenticated_channel( - interface_manager.encode_iface(iface) - ) + channel_cache = cache_thp.get_new_channel(interface_manager.encode_iface(iface)) r = Channel(channel_cache) r.set_buffer(buffer) r.set_channel_state(ChannelState.TH1)