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:
parent
e928fdbe22
commit
eae3ff7d50
@ -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")
|
||||
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user