lnchannel: (trivial) fix type hint of receive_fail_reasons
What changed, and why it matters
This is a one-line correction to a code comment (type hint) in Electrum's Lightning channel code. It does not change any actual program behavior, so it has no security effect.
No action required; the change is cosmetic and non-functional.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The commit updates a PEP 484-style type hint comment for self._receive_fail_reasons from an incorrect/deprecated tuple syntax to a modern tuple[bytes | None, OnionRoutingFailure | None] annotation. No runtime code is modified; it is purely a static-typing/documentation fix.
Changed components
electrum/lnchannel.pyInspect captured patch +1 / −1
diff --git a/electrum/lnchannel.py b/electrum/lnchannel.py
index bf9b807..3dd96ff 100644
--- a/electrum/lnchannel.py
+++ b/electrum/lnchannel.py
@@ -801,7 +801,7 @@ class Channel(AbstractChannel):
self._outgoing_channel_update = None # type: Optional[bytes]
self.revocation_store = RevocationStore(state["revocation_store"])
self._can_send_ctx_updates = True # type: bool
- self._receive_fail_reasons = {} # type: Dict[int, (bytes, OnionRoutingFailure)]
+ self._receive_fail_reasons = {} # type: Dict[int, tuple[bytes | None, OnionRoutingFailure | None]]
self.unconfirmed_closing_txid = None # not a state, only for GUI
self.sent_channel_ready = False # no need to persist this, because channel_ready is re-sent in channel_reestablish
self.sent_announcement_signatures = False
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.