What changed, and why it matters
This commit is a simple code cleanup that renames leftover references from 'LnAddr' to 'BOLT11Addr' and 'lndecode' to 'decode_bolt11_invoice' in comments and docstrings. It makes no functional changes to the code and has no security relevance.
No action needed; this is a non-functional rename follow-up.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The diff updates two docstrings and one inline comment to match a prior class/function rename. No executable code, logic, parsing behavior, or validation checks are modified. It is purely a follow-up documentation/comment consistency change.
Changed components
electrum/bolt11.pyelectrum/lnworker.pyInspect captured patch +5 / −4
diff --git a/electrum/bolt11.py b/electrum/bolt11.py
index 0d910a9..a532c44 100644
--- a/electrum/bolt11.py
+++ b/electrum/bolt11.py
@@ -332,7 +332,8 @@ class BOLT11Addr:
def validate_and_compare_features(self, myfeatures: 'LnFeatures') -> None:
"""Raises IncompatibleOrInsaneFeatures.
- note: these checks are not done by the parser (in lndecode), as then when we started requiring a new feature,
+ note: these checks are not done by the parser (in decode_bolt11_invoice),
+ as then when we started requiring a new feature,
old saved already paid invoices could no longer be parsed.
"""
from .lnutil import validate_features, ln_compare_features
@@ -404,8 +405,8 @@ class SerializableKey:
def decode_bolt11_invoice(invoice: str, *, verbose=False, net=None) -> BOLT11Addr:
- """Parses a string into an LnAddr object.
- Can raise LnDecodeException or IncompatibleOrInsaneFeatures.
+ """Parses a string into a BOLT11Addr object.
+ Can raise BOLT11DecodeException or IncompatibleOrInsaneFeatures.
"""
if net is None:
net = constants.net
diff --git a/electrum/lnworker.py b/electrum/lnworker.py
index 79421e6..622f5bc 100644
--- a/electrum/lnworker.py
+++ b/electrum/lnworker.py
@@ -2220,7 +2220,7 @@ class LNWallet(Logger):
return None
def _check_bolt11_invoice(self, bolt11_invoice: str, *, amount_msat: int = None) -> BOLT11Addr:
- """Parses and validates a bolt11 invoice str into a LnAddr.
+ """Parses and validates a bolt11 invoice str into a BOLT11Addr.
Includes pre-payment checks external to the parser.
"""
addr = decode_bolt11_invoice(bolt11_invoice)
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.