chore(core): remove unused THP `Channel` method
What changed, and why it matters
This commit simply deletes an unused helper method named write_handshake_message that forwarded its work to another method. There is no functional change, no bug fix, and no security relevance visible in the code change.
No security action needed. This is a routine code-cleanup commit.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The patch removes a 5-line wrapper method write_handshake_message from core/src/trezor/wire/thp/channel.py. The wrapper only called self.write_encrypted_payload with the same arguments and was not used elsewhere in the diff or referenced as a fix. No callers are adjusted, no logic changes, and no security behavior is altered.
Changed components
core/src/trezor/wire/thp/channel.pyInspect captured patch +0 / −5
diff --git a/core/src/trezor/wire/thp/channel.py b/core/src/trezor/wire/thp/channel.py
index f72d9ff6c..1ecbb08ca 100644
--- a/core/src/trezor/wire/thp/channel.py
+++ b/core/src/trezor/wire/thp/channel.py
@@ -411,11 +411,6 @@ class Channel:
return await self.write_encrypted_payload(ENCRYPTED, buffer[:payload_length])
- def write_handshake_message(
- self, ctrl_byte: int, payload: AnyBytes
- ) -> Awaitable[None]:
- return self.write_encrypted_payload(ctrl_byte, payload)
-
async def write_encrypted_payload(self, ctrl_byte: int, payload: AnyBytes) -> None:
ack_latency_ms = self.channel_cache.get_int(CHANNEL_ACK_LATENCY_MS) or 0
if __debug__:
Why this scored 15/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.