chore(core): remove unused `cid` argument to THP `Reassembler`
What changed, and why it matters
This is a minor code cleanup: a developer removed an unused channel ID argument from an internal helper class called Reassembler. There is no user-visible change, no bug fix, and no security relevance in the commit itself.
No action needed. This is a non-security refactoring change.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The commit removes the cid parameter from the Reassembler.__init__ signature in core/src/trezor/wire/thp/channel.py and updates the single call site in Channel.__init__ to stop passing self.get_channel_id_int(). The self.cid attribute was stored but never referenced, so this is a pure refactoring with no functional change.
Changed components
core/src/trezor/wire/thp/channel.pyInspect captured patch +2 / −3
diff --git a/core/src/trezor/wire/thp/channel.py b/core/src/trezor/wire/thp/channel.py
index d9cd61d51..c9515e2a8 100644
--- a/core/src/trezor/wire/thp/channel.py
+++ b/core/src/trezor/wire/thp/channel.py
@@ -66,8 +66,7 @@ _PREEMPT_TIMEOUT_MS = const(1_000)
class Reassembler:
- def __init__(self, cid: int, read_buf: ThpBuffer) -> None:
- self.cid = cid
+ def __init__(self, read_buf: ThpBuffer) -> None:
self.thp_read_buf = read_buf
self.reset()
@@ -173,7 +172,7 @@ class Channel:
# Shared variables
self.sessions: dict[int, GenericSessionContext] = {}
- self.reassembler = Reassembler(self.get_channel_id_int(), self.read_buf)
+ self.reassembler = Reassembler(self.read_buf)
self.last_write_ms: int = utime.ticks_ms()
# Temporary objects
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.