wallet_db: convert_version_66: trivial simplification
What changed, and why it matters
This is a one-line code cleanup that changes how a constant number is written. The value 147712 is rewritten as 0x24100, which is the exact same number in hexadecimal notation. A comment is also slightly reordered. There is no functional change and no security relevance.
No action needed. This is a non-functional refactor.
Security signals we found
No strong security signals were identified.
Evidence from the diff
In electrum/wallet_db.py, the convert_version_66 migration sets invoice_features to a fixed feature bit bitmap. The patch replaces the decimal literal 147712 with the equivalent hexadecimal literal 0x24100 and moves the descriptive comment. The numeric value and behavior are identical; this is a pure readability/simplification change.
Changed components
electrum/wallet_db.pyInspect captured patch +1 / −1
diff --git a/electrum/wallet_db.py b/electrum/wallet_db.py
index 688ab4c..dfb4bbb 100644
--- a/electrum/wallet_db.py
+++ b/electrum/wallet_db.py
@@ -1325,7 +1325,7 @@ class WalletDBUpgrader(Logger):
old_payment_infos = self.data.get('lightning_payments', {})
for key, old_v in old_payment_infos.items():
amount_msat, status, min_final_cltv_expiry, expiry, creation_ts = old_v
- invoice_features = 147712 # <VAR_ONION_REQ|PAYMENT_SECRET_REQ|BASIC_MPP_OPT: 0x24100>
+ invoice_features = 0x24100 # <VAR_ONION_REQ|PAYMENT_SECRET_REQ|BASIC_MPP_OPT>
new_v = (amount_msat, status, min_final_cltv_expiry, expiry, creation_ts, invoice_features)
new_payment_infos[key] = new_v
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.