1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2025-02-22 12:32:02 +00:00

refactor(core): rename channel creating function

[no changelog]
This commit is contained in:
M1nd3r 2024-07-31 14:56:47 +02:00
parent e928fdbe22
commit eae3ff7d50
2 changed files with 2 additions and 4 deletions

View File

@ -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")

View File

@ -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)