1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2025-04-20 17:19:01 +00:00
This commit is contained in:
M1nd3r 2025-03-24 12:37:32 +01:00
parent 198aefcb41
commit 64e27ec534

View File

@ -49,7 +49,9 @@ class ProtocolV2Channel(Channel):
def read(self, session_id: int) -> t.Any:
sid, msg_type, msg_data = self.read_and_decrypt()
if sid != session_id:
raise Exception("Received messsage on a different session.")
raise Exception(
f"Received messsage on a different session (expected/received): ({session_id}/{sid}) "
)
return self.mapping.decode(msg_type, msg_data)
def write(self, session_id: int, msg: t.Any) -> None: