Repository Analysis

spesmilo/electrum

Electrum Bitcoin Wallet

17.3 Moderate AI signal View on GitHub

Analysis Overview

This report presents the forensic synthetic code analysis of spesmilo/electrum, a Python project with 8,572 GitHub stars. SynthScan v2.0 examined 185,555 lines of code across 523 source files, recording 3035 pattern matches distributed across 20 syntactic categories. The overall adjusted score of 17.3 places this repository in the Moderate AI signal band.

The scanner applied 160+ deterministic lexical heuristics, multi-line block detectors, abstract syntax tree depth profilers, and a cross-file Jaccard similarity matrix to construct a statistically normalised synthetic code estimate. All matches are individually weighted by severity coefficient and contextual multiplier before summation, and the resulting headline score is temporally discounted to account for the repository's development history relative to the commercial emergence of large language model coding tooling (November 2022 onward).

17.3
Adjusted Score
17.3
Raw Score
100%
Time Factor
2026-08-29
Last Push
8.6K
Stars
Python
Language
185.6K
Lines of Code
523
Files
3.0K
Pattern Hits
2026-08-29
Scan Date
0.06
HC Hit Rate

What These Metrics Mean

Adjusted Score
Primary synthetic code indicator. Raw score normalised per 1,000 lines of code and multiplied by the temporal discount factor. This is the definitive comparative metric — use it to rank repositories by AI authorship density.
Raw Score
The unmodified sum of all severity-weighted, context-multiplied pattern match scores before temporal discounting. Reflects the absolute signal strength independent of when the repository was last active.
Time Factor
The temporal discount multiplier (0–100%) applied to the raw score. Repositories last updated before ChatGPT's launch (Nov 2022) receive a 5% factor. Full signal is only assigned to repositories active in the post-adoption era (Jan 2024+).
Pattern Hits
Total count of individual pattern matches across all files and categories. A high hit count with a low score may indicate a very large codebase with isolated AI snippets; a low count with a high score indicates dense, concentrated AI signatures.
HC Hit Rate
High+Critical pattern hits per file, averaged across the repository. This orthogonal signal catches repositories where a few files are densely packed with high-severity AI tells — a strong indicator even when the normalised score appears moderate due to codebase size.
Lines of Code / Files
Total lines and files analysed. The scanner examines 94 file extensions. These denominators are used to normalise the score, enabling fair comparison between repositories of vastly different sizes.

Score History

This chart maps the temporal evolution of the adjusted synthetic code score across successive scan runs. An upward trajectory indicates ongoing incorporation of AI-generated code or expanding LLM-assisted scaffolding; a stable or declining trajectory may reflect active human refactoring, code removal, or the adoption of stricter authorship policies. The dashed secondary line (right axis) independently tracks total raw pattern hit count, which can diverge from the normalised score when codebase size changes significantly between scans.

Severity Breakdown

Classifies detected patterns by their diagnostic confidence and structural impact. CRITICAL patterns (coefficient 10) represent definitive synthetic signatures — hallucinated imports, explicit LLM attribution metadata — virtually never produced by human authors. HIGH (5) indicates strong structural tells such as cross-file repetition or cross-linguistic idioms. MEDIUM (2) covers recognisable conversational padding and AI-specific vocabulary. LOW (1) captures subtle indicators like tautological comments and generic boilerplate that require density to carry independent signal.

CRITICAL 14HIGH 15MEDIUM 117LOW 2889

Directory Score Breakdown

This horizontal bar chart decomposes the repository's raw synthetic code score by top-level directory, allowing you to pinpoint precisely which modules or components carry the highest AI authorship density. Directories with disproportionately high scores relative to their size warrant targeted manual review: concentrated AI signatures often trace back to mass-generated configuration layers, auto-ported test suites, LLM-scaffolded boilerplate classes, or entire subsystems authored under heavy copilot assistance. Use this view to prioritise your human code-review effort.

Pattern Findings

The scanner identified 3035 distinct pattern matches across 20 syntactic categories. Each entry below represents a discrete location in the source code where the engine recorded a statistically significant AI authorship indicator. Expand any category row to inspect the individual file paths, line numbers, code snippets, and the lexical context (CODE, COMMENT, or STRING) in which each match was detected.

Reading the findings table: The Severity column indicates the diagnostic confidence level (CRITICAL / HIGH / MEDIUM / LOW). The Context column identifies whether the match occurred inside executable code, an inline comment, or a string literal — comment-context matches receive a ×1.5 weight because LLMs systematically over-annotate. The ⚡ bolt icon marks clustered matches: three or more patterns within a 10-line window, each receiving an additional ×1.5 density multiplier as dense clusters constitute far stronger evidence of synthetic authorship than isolated hits.

Hyper-Verbose Identifiers1262 hits · 1204 pts
SeverityFileLineSnippetContext
LOWtests/test_onion_message.py65 def test_path_pubkeys_blinded_path_appended(self):CODE
LOWtests/test_onion_message.py114 def test_onion_message_payload_size(self):CODE
LOWtests/test_onion_message.py148 def test_decode_onion_message_packet(self):CODE
LOWtests/test_onion_message.py154 def test_decode_onion_message(self):CODE
LOWtests/test_onion_message.py164 def test_decrypt_onion_message(self):CODE
LOWtests/test_onion_message.py223 def prepare_blinded_path_bob_to_dave(self):CODE
LOWtests/test_onion_message.py235 def test_create_onionmessage_to_blinded_path_via_alice(self):CODE
LOWtests/test_onion_message.py283 async def wait_one_htlc_switch_iteration(self, *args):CODE
LOWtests/test_onion_message.py476 def my_on_onion_message_received_unsolicited(*args, **kwargs):CODE
LOWtests/test_onion_message.py495 async def test_get_blinded_paths_to_me_payment(self):CODE
LOWtests/test_onion_message.py533 async def test_create_route_to_introduction_point(self):CODE
LOWtests/test_wizard.py158 def _create_xpub_keystore_wallet(self, *, wallet_type: str = 'standard', xpub):CODE
LOWtests/test_wizard.py173 def _sanity_checks_after_disabling_keystore(CODE
LOWtests/test_wizard.py215 async def test_haveseed_ext_electrum(self):CODE
LOWtests/test_wizard.py246 async def test_haveseed_electrum__mismatching_seed(self):CODE
LOWtests/test_wizard.py265 async def test_haveseed_electrum_oldseed(self):CODE
LOWtests/test_wizard.py457 def _set_password_and_check_address(CODE
LOWtests/test_wizard.py484 async def test_set_password_and_encrypt_file(self):CODE
LOWtests/test_wizard.py506 async def test_set_password_but_dont_encrypt_file(self):CODE
LOWtests/test_wizard.py528 async def test_create_standard_wallet_createseed(self):CODE
LOWtests/test_wizard.py547 async def test_create_standard_wallet_createseed_passphrase(self):CODE
LOWtests/test_wizard.py573 async def test_create_standard_wallet_haveseed_electrum_oldseed(self):CODE
LOWtests/test_wizard.py592 async def test_create_standard_wallet_haveseed_electrum_oldseed_in_hex_format(self):CODE
LOWtests/test_wizard.py611 async def test_create_standard_wallet_haveseed_electrum_oldseed_passphrase(self):CODE
LOWtests/test_wizard.py635 async def test_create_standard_wallet_haveseed_electrum(self):CODE
LOWtests/test_wizard.py649 async def test_create_standard_wallet_haveseed_electrum_passphrase(self):CODE
LOWtests/test_wizard.py667 async def test_create_standard_wallet_have_master_key(self):CODE
LOWtests/test_wizard.py898 async def test_create_standard_wallet_trezor(self):CODE
LOWtests/test_wizard.py1115 async def test_create_imported_wallet_from_addresses(self):CODE
LOWtests/test_wizard.py1139 async def test_create_imported_wallet_from_addresses__invalid_input(self):CODE
LOWtests/test_wizard.py1155 async def test_create_imported_wallet_from_wif_keys(self):CODE
LOWtests/regtest.py64 def test_backup_local_forceclose(self):CODE
LOWtests/regtest.py73 def test_redeem_received_htlcs(self):CODE
LOWtests/regtest.py76 def test_redeem_offered_htlcs(self):CODE
LOWtests/regtest.py79 def test_breach_with_unspent_htlc(self):CODE
LOWtests/regtest.py82 def test_breach_with_spent_htlc(self):CODE
LOWtests/regtest.py85 def test_lnwatcher_waits_until_fees_go_down(self):CODE
LOWtests/regtest.py104 def test_swapserver_success_forward(self):CODE
LOWtests/regtest.py107 def test_swapserver_success_reverse(self):CODE
LOWtests/regtest.py110 def test_swapserver_forceclose(self):CODE
LOWtests/test_transaction.py105 def test_tx_update_signatures(self):CODE
LOWtests/test_transaction.py114 def test_tx_setting_locktime_invalidates_ser_cache(self):CODE
LOWtests/test_transaction.py120 def test_tx_setting_version_invalidates_ser_cache(self):CODE
LOWtests/test_transaction.py126 def test_tx_deserialize_for_signed_network_tx(self):CODE
LOWtests/test_transaction.py1075 def test_check_sighash_types_sighash_all(self):CODE
LOWtests/test_transaction.py1083 def test_check_sighash_types_sighash_none(self):CODE
LOWtests/test_transaction.py1091 def test_check_sighash_types_sighash_single(self):CODE
LOWtests/test_transaction.py1100 def test_check_sighash_types_sighash_all_anyonecanpay(self):CODE
LOWtests/test_transaction.py1109 def test_check_sighash_types_sighash_none_anyonecanpay(self):CODE
LOWtests/test_transaction.py1117 def test_check_sighash_types_sighash_single_anyonecanpay(self):CODE
LOWtests/test_transaction.py87 def test_match_against_script_template(self):CODE
LOWtests/test_transaction.py153 def test_estimated_output_size(self):CODE
LOWtests/test_transaction.py174 def test_convert_raw_tx_to_hex(self):CODE
LOWtests/test_transaction.py182 def test_get_address_from_output_script(self):CODE
LOWtests/test_transaction.py215 def test_tx_serialize_methods_for_psbt(self):CODE
LOWtests/test_transaction.py227 def test_tx_serialize_methods_for_network_tx(self):CODE
LOWtests/test_transaction.py236 def test_tx_serialize_methods_for_psbt_that_is_ready_to_be_finalized(self):CODE
LOWtests/test_transaction.py394 def test_txid_negative_version_num(self):CODE
LOWtests/test_transaction.py405 def test_txid_invalid_op_return(self):CODE
LOWtests/test_transaction.py1128 def test_taproot_keypath_spending(self):CODE
1202 more matches not shown…
Unused Imports763 hits · 677 pts
SeverityFileLineSnippetContext
LOWsetup.py9CODE
LOWsetup.py10CODE
LOWsetup.py13CODE
LOWtests/test_onion_message.py5CODE
LOWtests/test_onion_message.py16CODE
LOWtests/test_onion_message.py24CODE
LOWtests/test_x509.py1CODE
LOWtests/test_wizard.py5CODE
LOWtests/regtest.py1CODE
LOWtests/test_lnwallet.py7CODE
LOWtests/test_lnwallet.py10CODE
LOWtests/test_lnwallet.py13CODE
LOWtests/test_storage_upgrade.py1CODE
LOWtests/test_storage_upgrade.py2CODE
LOWtests/test_storage_upgrade.py3CODE
LOWtests/test_storage_upgrade.py6CODE
LOWtests/test_storage_upgrade.py9CODE
LOWtests/test_storage_upgrade.py10CODE
LOWtests/test_storage_upgrade.py12CODE
LOWtests/test_storage_upgrade.py13CODE
LOWtests/test_storage_upgrade.py15CODE
LOWtests/test_lnrouter.py5CODE
LOWtests/test_lnrouter.py9CODE
LOWtests/test_lnrouter.py18CODE
LOWtests/test_bolt11.py5CODE
LOWtests/test_bolt11.py10CODE
LOWtests/test_bolt11.py12CODE
LOWtests/test_lnpeer.py3CODE
LOWtests/test_lnpeer.py5CODE
LOWtests/test_lnpeer.py7CODE
LOWtests/test_lnpeer.py8CODE
LOWtests/test_lnpeer.py10CODE
LOWtests/test_lnpeer.py11CODE
LOWtests/test_lnpeer.py12CODE
LOWtests/test_lnpeer.py14CODE
LOWtests/test_lnpeer.py14CODE
LOWtests/test_lnpeer.py14CODE
LOWtests/test_lnpeer.py14CODE
LOWtests/test_lnpeer.py14CODE
LOWtests/test_lnpeer.py19CODE
LOWtests/test_lnpeer.py19CODE
LOWtests/test_lnpeer.py20CODE
LOWtests/test_lnpeer.py27CODE
LOWtests/test_lnpeer.py28CODE
LOWtests/test_lnpeer.py29CODE
LOWtests/test_lnpeer.py29CODE
LOWtests/test_lnpeer.py30CODE
LOWtests/test_lnpeer.py31CODE
LOWtests/test_lnpeer.py33CODE
LOWtests/test_lnpeer.py34CODE
LOWtests/test_lnpeer.py34CODE
LOWtests/test_lnpeer.py34CODE
LOWtests/test_lnpeer.py39CODE
LOWtests/test_lnpeer.py41CODE
LOWtests/test_lnpeer.py43CODE
LOWtests/test_lnpeer.py43CODE
LOWtests/test_lnpeer.py46CODE
LOWtests/test_lnpeer.py51CODE
LOWtests/test_lnpeer.py51CODE
LOWtests/test_lnpeer.py53CODE
703 more matches not shown…
Excessive Try-Catch Wrapping430 hits · 480 pts
SeverityFileLineSnippetContext
LOWtests/test_lnutil.py483 except Exception as e:CODE
LOWtests/test_lnutil.py505 except Exception as e:CODE
LOWtests/test_jsondb.py33 except Exception as e:CODE
LOWtests/qml/qt_util.py52 except Exception as e:CODE
LOWtests/qml/qt_util.py94 except Exception as e:CODE
MEDIUMtests/qml/qt_util.py45def start_qt_task():CODE
LOWtests/toyserver/toynetwork.py80 except Exception:CODE
LOWcontrib/locale/stats.py36 except Exception as e:CODE
LOWcontrib/android/get_apk_versioncode.py64 except Exception:CODE
LOWelectrum/descriptor.py195 except Exception:CODE
LOWelectrum/logging.py296 except Exception as e:CODE
LOWelectrum/logging.py368 except Exception:CODE
LOWelectrum/pem.py37 except Exception as e:CODE
MEDIUMelectrum/pem.py34def a2b_base64(s):CODE
LOWelectrum/lnverifier.py143 except Exception:CODE
LOWelectrum/contacts.py55 except Exception:CODE
LOWelectrum/onion_message.py281 except Exception as e:CODE
LOWelectrum/onion_message.py796 except Exception as e:CODE
LOWelectrum/x509.py320 except Exception as e:CODE
MEDIUMelectrum/util.py441def json_encode(obj):CODE
MEDIUMelectrum/util.py1141def run_with_except_hook(*args2, **kwargs2):CODE
MEDIUMelectrum/util.py1161def read_json_file(path):CODE
LOWelectrum/util.py391 except Exception as e:CODE
LOWelectrum/util.py452 except Exception:CODE
LOWelectrum/util.py650 except Exception:CODE
LOWelectrum/util.py743 except Exception:CODE
LOWelectrum/util.py757 except Exception:CODE
LOWelectrum/util.py1121 except Exception:CODE
LOWelectrum/util.py1144 except Exception:CODE
LOWelectrum/util.py1252 except Exception as e:CODE
LOWelectrum/util.py1571 except Exception as e:CODE
LOWelectrum/util.py1731 except Exception as e:CODE
LOWelectrum/util.py2333 except Exception as e:CODE
LOWelectrum/channel_db.py190 except Exception:CODE
LOWelectrum/channel_db.py847 except Exception:CODE
LOWelectrum/bitcoin.py665 except Exception as e:CODE
LOWelectrum/bitcoin.py714 except Exception as e:CODE
LOWelectrum/bitcoin.py723 except Exception as e:CODE
LOWelectrum/bitcoin.py733 except Exception as e:CODE
LOWelectrum/bitcoin.py898 except Exception as e:CODE
MEDIUMelectrum/transaction.py637def read_compact_size(self):CODE
MEDIUMelectrum/transaction.py1472def get_fee(self) -> Optional[int]:CODE
LOWelectrum/transaction.py1304 except Exception as e:CODE
LOWelectrum/transaction.py672 except Exception as e:CODE
LOWelectrum/transaction.py1501 except Exception:CODE
LOWelectrum/transaction.py1507 except Exception:CODE
LOWelectrum/transaction.py1521 except Exception:CODE
LOWelectrum/transaction.py1558 except Exception as e:CODE
LOWelectrum/constants.py41 except Exception:CODE
LOWelectrum/qrscanner.py98 except Exception:CODE
MEDIUMelectrum/interface.py374def create_connection(self):CODE
MEDIUMelectrum/interface.py776def run(self):CODE
LOWelectrum/interface.py154 except Exception:CODE
LOWelectrum/interface.py199 except Exception as e:CODE
LOWelectrum/interface.py511 except Exception as e:CODE
LOWelectrum/interface.py715 except Exception as e:CODE
LOWelectrum/interface.py1443 except Exception as e:CODE
LOWelectrum/json_db.py124 except Exception:CODE
LOWelectrum/json_db.py148 except Exception as e:CODE
LOWelectrum/json_db.py155 except Exception:CODE
370 more matches not shown…
Deep Nesting228 hits · 172 pts
SeverityFileLineSnippetContext
LOWtests/test_transaction.py250CODE
LOWtests/test_wallet_vertical.py3448CODE
LOWtests/test_lnutil.py91CODE
LOWtests/test_lnutil.py813CODE
LOWtests/lnhelpers.py410CODE
LOWtests/qml/qt_util.py64CODE
LOWtests/qml/qt_util.py66CODE
LOWtests/toyserver/toyserver.py204CODE
LOWcontrib/android/apkdiff.py47CODE
LOWelectrum/descriptor.py864CODE
LOWelectrum/descriptor.py921CODE
LOWelectrum/descriptor.py1037CODE
LOWelectrum/descriptor.py444CODE
LOWelectrum/mpp_split.py114CODE
LOWelectrum/logging.py87CODE
LOWelectrum/lnsweep.py528CODE
LOWelectrum/lnutil.py1009CODE
LOWelectrum/lnutil.py1605CODE
LOWelectrum/version.py13CODE
LOWelectrum/onion_message.py264CODE
LOWelectrum/onion_message.py410CODE
LOWelectrum/x509.py187CODE
LOWelectrum/lnchannel.py348CODE
LOWelectrum/lnchannel.py403CODE
LOWelectrum/util.py695CODE
LOWelectrum/util.py942CODE
LOWelectrum/util.py1796CODE
LOWelectrum/util.py2065CODE
LOWelectrum/channel_db.py251CODE
LOWelectrum/channel_db.py549CODE
LOWelectrum/channel_db.py588CODE
LOWelectrum/channel_db.py1090CODE
LOWelectrum/bitcoin.py299CODE
LOWelectrum/bitcoin.py480CODE
LOWelectrum/transaction.py681CODE
LOWelectrum/transaction.py760CODE
LOWelectrum/transaction.py497CODE
LOWelectrum/transaction.py637CODE
LOWelectrum/transaction.py651CODE
LOWelectrum/transaction.py1053CODE
LOWelectrum/transaction.py1757CODE
LOWelectrum/transaction.py1797CODE
LOWelectrum/transaction.py2155CODE
LOWelectrum/transaction.py2238CODE
LOWelectrum/transaction.py2560CODE
LOWelectrum/qrscanner.py89CODE
LOWelectrum/interface.py183CODE
LOWelectrum/interface.py815CODE
LOWelectrum/interface.py1194CODE
LOWelectrum/lnrouter.py577CODE
LOWelectrum/lnhtlc.py213CODE
LOWelectrum/payment_identifier.py192CODE
LOWelectrum/payment_identifier.py216CODE
LOWelectrum/payment_identifier.py315CODE
LOWelectrum/payment_identifier.py531CODE
LOWelectrum/address_synchronizer.py283CODE
LOWelectrum/address_synchronizer.py665CODE
LOWelectrum/address_synchronizer.py714CODE
LOWelectrum/address_synchronizer.py898CODE
LOWelectrum/address_synchronizer.py964CODE
168 more matches not shown…
Hallucination Indicators14 hits · 170 pts
SeverityFileLineSnippetContext
CRITICALtests/test_lnpeer.py2124 for hint in w.network.path_finder.liquidity_hints._liquidity_hints.values():CODE
CRITICALtests/test_lnpeer.py2131 for hint in w.network.path_finder.liquidity_hints._liquidity_hints.values():CODE
CRITICALelectrum/wizard.py886 if self._daemon.config.cv.NETWORK_AUTO_CONNECT.is_modifiable():CODE
CRITICALelectrum/plugins/nwc/nwcserver.py599 "pubkey": self.wallet.lnworker.node_keypair.pubkey.hex(),CODE
CRITICALelectrum/gui/qml/qeswaphelper.py643 self._swap, invoice = await self._wallet.wallet.lnworker.swap_manager.request_normal_swap(CODE
CRITICALelectrum/gui/qml/qeswaphelper.py649 tx = self._wallet.wallet.lnworker.swap_manager.create_funding_tx(self._swap, dummy_tx, password=self._waCODE
CRITICALelectrum/gui/qml/qeswaphelper.py650 coro2 = self._wallet.wallet.lnworker.swap_manager.wait_for_htlcs_and_broadcast(CODE
CRITICALelectrum/gui/qml/qeswaphelper.py666 if self._wallet.wallet.lnworker.swap_manager.cancel_normal_swap(self._swap):CODE
CRITICALelectrum/gui/qml/qeswaphelper.py698 max_swap_amount = self._wallet.wallet.lnworker.swap_manager.client_max_amount_forward_swap()CODE
CRITICALelectrum/gui/qml/qenetwork.py205 return self.network.config.cv.NETWORK_AUTO_CONNECT.is_set()CODE
CRITICALelectrum/gui/qml/qefx.py78 if not self.fx.config.cv.FX_HISTORY_RATES.is_set():CODE
CRITICALelectrum/gui/qml/qewallet.py427 return self.wallet.lnworker.node_keypair.pubkey.hex() if self.wallet.lnworker else ''CODE
CRITICALelectrum/gui/qml/qechanneldetails.py99 return self._wallet.wallet.lnworker.lnpeermgr.get_node_alias(self._channel.node_id) or ''CODE
CRITICALelectrum/gui/qt/history_list.py191 # and self.parent.wallet.invoices.paid.get(tx_hash):COMMENT
Over-Commented Block150 hits · 140 pts
SeverityFileLineSnippetContext
LOWtests/test_verifier.py61 #COMMENT
LOWtests/test_verifier.py81 # __________/ \________________COMMENT
LOWtests/test_lnchannel.py1# Copyright (C) 2018 The Electrum developersCOMMENT
LOWcontrib/ban_unicode.py1#!/usr/bin/env python3COMMENT
LOWcontrib/release.sh1#!/bin/bashCOMMENT
LOWcontrib/release.sh21# Note: steps before doing a new release:COMMENT
LOWcontrib/make_libsecp256k1.sh1#!/bin/bashCOMMENT
LOWcontrib/make_zbar.sh1#!/bin/bashCOMMENT
LOWcontrib/osx/make_osx.sh61# don't add debug info to compiled C files (e.g. when pip calls setuptools/wheel calls gcc)COMMENT
LOWcontrib/requirements/requirements-build-base.txt1# This file contains build-time dependencies needed to build other higher level build-time dependenciesCOMMENT
LOWcontrib/android/make_apk.sh41# FIXME: changing "APP_PACKAGE_NAME" seems to require a clean rebuild of ".buildozer/".COMMENT
LOWelectrum/descriptor.py1# Copyright (c) 2017 Andrew ChowCOMMENT
LOWelectrum/logging.py241 super()._log(level, msg, *args, **kwargs)COMMENT
LOWelectrum/pem.py1#!/usr/bin/env pythonCOMMENT
LOWelectrum/lnverifier.py1# -*- coding: utf-8 -*-COMMENT
LOWelectrum/lnutil.py501# https://github.com/lightning/bolts/commit/ba00bf8f4cd85f21bacfc03adcafd4acc7d68382COMMENT
LOWelectrum/contacts.py1# Electrum - Lightweight Bitcoin ClientCOMMENT
LOWelectrum/onion_message.py1# Electrum - Lightweight Bitcoin ClientCOMMENT
LOWelectrum/x509.py1#!/usr/bin/env pythonCOMMENT
LOWelectrum/lnchannel.py1# Copyright (C) 2018 The Electrum developersCOMMENT
LOWelectrum/lnchannel.py1481 # 0 <remotehtlcsig> <localhtlcsig> <> <witness_script>COMMENT
LOWelectrum/old_mnemonic.py1#!/usr/bin/env pythonCOMMENT
LOWelectrum/util.py1# Electrum - lightweight Bitcoin clientCOMMENT
LOWelectrum/util.py1441 if exc:COMMENT
LOWelectrum/channel_db.py1# -*- coding: utf-8 -*-COMMENT
LOWelectrum/bitcoin.py1# -*- coding: utf-8 -*-COMMENT
LOWelectrum/transaction.py1#!/usr/bin/env pythonCOMMENT
LOWelectrum/constants.py1# -*- coding: utf-8 -*-COMMENT
LOWelectrum/qrscanner.py1#!/usr/bin/env pythonCOMMENT
LOWelectrum/interface.py1#!/usr/bin/env pythonCOMMENT
LOWelectrum/interface.py281 force_after = 1 # secondsCOMMENT
LOWelectrum/json_db.py1#!/usr/bin/env pythonCOMMENT
LOWelectrum/lnrouter.py1# -*- coding: utf-8 -*-COMMENT
LOWelectrum/lnonion.py1# -*- coding: utf-8 -*-COMMENT
LOWelectrum/address_synchronizer.py1# Electrum - lightweight Bitcoin clientCOMMENT
LOWelectrum/address_synchronizer.py301 # of add_transaction tx, we might learn of more-and-more inputs ofCOMMENT
LOWelectrum/base_crash_reporter.py1# Electrum - lightweight Bitcoin clientCOMMENT
LOWelectrum/crypto.py1# -*- coding: utf-8 -*-COMMENT
LOWelectrum/segwit_addr.py1COMMENT
LOWelectrum/lrucache.py1# The MIT License (MIT)COMMENT
LOWelectrum/mnemonic.py1#!/usr/bin/env pythonCOMMENT
LOWelectrum/stored_dict.py1#!/usr/bin/env pythonCOMMENT
LOWelectrum/harden_memory_linux.py1# Copyright (C) 2020 cptpcrdCOMMENT
LOWelectrum/slip39.py1# Copyright (c) 2018 Andrew R. KozlikCOMMENT
LOWelectrum/lnworker.py361 existing_peer = self._peers.get(node_id)COMMENT
LOWelectrum/lnworker.py2961 # * for trampoline forwarding -> "payment hash + payment secret from outer onion"COMMENT
LOWelectrum/storage.py1#!/usr/bin/env pythonCOMMENT
LOWelectrum/network.py1# Electrum - Lightweight Bitcoin ClientCOMMENT
LOWelectrum/plugin.py1#!/usr/bin/env pythonCOMMENT
LOWelectrum/plugin.py961# https://github.com/libusb/hidapi/issues/45COMMENT
LOWelectrum/i18n.py1#!/usr/bin/env pythonCOMMENT
LOWelectrum/i18n.py81 return translationCOMMENT
LOWelectrum/blockchain.py1# Electrum - lightweight Bitcoin clientCOMMENT
LOWelectrum/synchronizer.py1#!/usr/bin/env pythonCOMMENT
LOWelectrum/trampoline.py161def is_legacy_relay(invoice_features, r_tags) -> Tuple[bool, Set[bytes]]:COMMENT
LOWelectrum/submarine_swaps.py61COMMENT
LOWelectrum/lnpeer.py761 first_block = constants.net.BLOCK_HEIGHT_FIRST_LIGHTNING_CHANNELSCOMMENT
LOWelectrum/lnpeer.py1521 # when the remote realizes we are behind, they might send an "error" message - but the spec mandatesCOMMENT
LOWelectrum/lnpeer.py2761 # SHOULD set max_fee_satoshis to at least the max_fee_satoshis receivedCOMMENT
LOWelectrum/txbatcher.py1# This class batches outgoing payments and incoming utxo sweeps.COMMENT
90 more matches not shown…
Self-Referential Comments38 hits · 124 pts
SeverityFileLineSnippetContext
MEDIUMtests/test_lnchannel.py101 # Create a test channel which will be used for the duration of thisCOMMENT
MEDIUMelectrum/lnchannel.py1946 # This method is used both in the GUI, and in lnpeer.schedule_force_closingCOMMENT
MEDIUMelectrum/lnworker.py3352 # This method is called when an invoice or request is deleted by the user.COMMENT
MEDIUMelectrum/lnwatcher.py190 """This function is called when a channel was closed. In this caseSTRING
MEDIUMelectrum/txbatcher.py12# The following code prevents that by making tx2 a child of tx1.COMMENT
MEDIUMelectrum/wallet.py4156 """This method is not called in the code, it is kept for console use"""STRING
MEDIUMelectrum/_vendor/pyperclip/__init__.py463 # This function is heavily based onCOMMENT
MEDIUMelectrum/plugins/timelock_recovery/qt.py126 # Create an HBox layout. The logo will be on the left and the rest of the dialog on the right.COMMENT
MEDIUMelectrum/plugins/timelock_recovery/qt.py129 # Create the logo label.COMMENT
MEDIUMelectrum/plugins/timelock_recovery/qt.py138 # Create a VBox layout for the main contents of the dialog.COMMENT
MEDIUMelectrum/plugins/timelock_recovery/qt.py527 # Create an HBox layout. The logo will be on the left and the rest of the dialog on the right.COMMENT
MEDIUMelectrum/plugins/timelock_recovery/qt.py530 # Create the logo labelCOMMENT
MEDIUMelectrum/plugins/timelock_recovery/qt.py535 # Create a VBox layout for the main contentsCOMMENT
MEDIUMelectrum/plugins/timelock_recovery/qt.py404 # Create an HBox layout. The logo will be on the left and the rest of the dialog on the right.COMMENT
MEDIUMelectrum/plugins/timelock_recovery/qt.py418 # Create a VBox layout for the main contents of the dialog.COMMENT
MEDIUMelectrum/plugins/keepkey/keepkey.py422 # This function is called from the TREZOR libraries (via tx_api)COMMENT
MEDIUMelectrum/plugins/nwc/qt.py82 # Create the logo label.COMMENT
MEDIUMelectrum/plugins/revealer/qt.py340 # Create an HBox layout. The logo will be on the left and the rest of the dialog on the right.COMMENT
MEDIUMelectrum/plugins/revealer/qt.py343 # Create the logo label.COMMENT
MEDIUMelectrum/plugins/revealer/qt.py352 # Create a VBox layout for the main contents of the dialog.COMMENT
MEDIUMelectrum/plugins/revealer/qt.py360 # Create the labels.COMMENT
MEDIUMelectrum/plugins/revealer/qt.py139 # Create an HBox layout. The logo will be on the left and the rest of the dialog on the right.COMMENT
MEDIUMelectrum/plugins/revealer/qt.py142 # Create the logo label.COMMENT
MEDIUMelectrum/plugins/revealer/qt.py154 # Create a VBox layout for the main contents of the dialog.COMMENT
MEDIUMelectrum/plugins/revealer/qt.py165 # Create the labels.COMMENT
MEDIUMelectrum/plugins/revealer/qt.py176 # Create the buttons.COMMENT
MEDIUMelectrum/plugins/revealer/qt.py192 # Define the create noise file function.COMMENT
MEDIUMelectrum/plugins/revealer/qt.py202 # Create the noise scan QR text edit.COMMENT
MEDIUMelectrum/plugins/revealer/qt.py381 # Create the buttons.COMMENT
MEDIUMelectrum/plugins/revealer/qt.py403 # Create the custom secret scan QR text edit.COMMENT
MEDIUMelectrum/plugins/safe_t/safe_t.py395 # This function is called from the TREZOR libraries (via tx_api)COMMENT
MEDIUMelectrum/hw_wallet/trezor_qt_pinmatrix.py3# This file is part of the Trezor project.COMMENT
MEDIUMelectrum/gui/common_qt/util.py124 # Create a QImage to draw onCOMMENT
MEDIUMelectrum/gui/common_qt/util.py130 # Create the image with appropriate sizeCOMMENT
MEDIUMelectrum/gui/qt/qrreader/qtmultimedia/camera_dialog.py120 # Create a layout for the controlsCOMMENT
MEDIUMelectrum/gui/qt/qrreader/qtmultimedia/camera_dialog.py138 # Create the video surface and receive events when new frames arriveCOMMENT
MEDIUMelectrum/gui/qt/qrreader/qtmultimedia/camera_dialog.py142 # Create the crop blur effectCOMMENT
MEDIUMelectrum/gui/qt/qrreader/qtmultimedia/video_surface.py74 # Create a copy of the image so the original frame data can be freedCOMMENT
Modern Structural Boilerplate73 hits · 70 pts
SeverityFileLineSnippetContext
LOWelectrum/lnchannel.py901 def set_remote_update(self, payload: dict) -> None:CODE
LOWelectrum/lnchannel.py191 def set_short_channel_id(self, short_id: ShortChannelID) -> None:CODE
LOWelectrum/lnchannel.py207 def set_state(self, state: ChannelState, *, force: bool = False) -> None:CODE
LOWelectrum/lnchannel.py348 def update_unfunded_state(self) -> None:CODE
LOWelectrum/lnchannel.py403 def update_funded_state(self, *, funding_txid: str, funding_height: TxMinedInfo) -> None:CODE
LOWelectrum/lnchannel.py1084 def set_can_send_ctx_updates(self, b: bool) -> None:CODE
LOWelectrum/lnchannel.py1108 def set_frozen_for_sending(self, b: bool) -> None:CODE
LOWelectrum/lnchannel.py1115 def set_frozen_for_receiving(self, b: bool) -> None:CODE
LOWelectrum/lnchannel.py1800 def update_fee(self, feerate: int, from_us: bool) -> None:CODE
LOWelectrum/channel_db.py900 def _update_num_policies_for_chan(self, short_channel_id: ShortChannelID) -> None:CODE
LOWelectrum/transaction.py2472 def set_rbf(self, rbf: bool) -> None:CODE
LOWelectrum/transaction.py2560 def update_signatures(self, signatures: Sequence[Union[bytes, None]]) -> None:CODE
LOWelectrum/constants.py94 def set_as_network(cls) -> None:CODE
LOWelectrum/lnrouter.py272 def update_can_send(self, is_forward_direction: bool, *, amount_msat: int) -> None:CODE
LOWelectrum/lnrouter.py278 def update_cannot_send(self, is_forward_direction: bool, *, amount_msat: int) -> None:CODE
LOWelectrum/lnrouter.py335 def update_can_send(self, node_from: bytes, node_to: bytes, channel_id: ShortChannelID, *, amount_msat: int) -> NoneCODE
LOWelectrum/lnrouter.py340 def update_cannot_send(self, node_from: bytes, node_to: bytes, channel_id: ShortChannelID, *, amount_msat: int) -> NCODE
LOWelectrum/lnrouter.py488 def update_num_inflight_htlcs(self, route: LNPaymentRoute, *, add_htlcs: bool) -> None:CODE
LOWelectrum/lnhtlc.py64 def _set_revack_pending(self, sub: HTLCOwner, pending: bool) -> None:CODE
LOWelectrum/lnhtlc.py213 def _update_maybe_active_htlc_ids(self) -> None:CODE
LOWelectrum/address_synchronizer.py699 def _update_stored_local_height(self) -> None:CODE
LOWelectrum/simple_config.py242 def set_chain_config_opt_based_on_android_packagename(cls, config_options: dict[str, Any]) -> None:CODE
LOWelectrum/simple_config.py282 def set_key(self, key: Union[str, ConfigVar, ConfigVarWithConfig], value, *, save=True) -> None:CODE
LOWelectrum/simple_config.py303 def _set_key_in_user_config(self, key: str, value, *, save=True) -> None:CODE
LOWelectrum/stored_dict.py129 def set_parent(self, *, key: _FLEX_KEY, parent: Optional['BaseStoredObject']) -> None:CODE
LOWelectrum/harden_memory_linux.py60def set_dumpable(flag: bool) -> None:CODE
LOWelectrum/harden_memory_linux.py75def set_dumpable_safe(flag: bool) -> None:CODE
LOWelectrum/lnworker.py3114 def set_invoice_status(self, key: str, status: int) -> None:CODE
LOWelectrum/lnworker.py3126 def set_request_status(self, payment_hash: bytes, status: int) -> None:CODE
LOWelectrum/lnworker.py3136 def set_payment_status(self, payment_hash: bytes, status: int, *, direction: lnutil.Direction) -> None:CODE
LOWelectrum/network.py714 def _set_default_server(self) -> None:CODE
LOWelectrum/network.py821 def set_server_bookmark(self, server: ServerAddr, *, add: bool) -> None:CODE
LOWelectrum/i18n.py116def set_language(x: Optional[str]) -> None:CODE
LOWelectrum/blockchain.py363 def update_size(self) -> None:CODE
LOWelectrum/exchange_rate.py84 async def update_safe(self, ccy: str) -> None:CODE
LOWelectrum/exchange_rate.py698 def set_enabled(self, b: bool) -> None:CODE
LOWelectrum/invoices.py184 def set_amount_msat(self, amount_msat: Union[int, str]) -> None:CODE
LOWelectrum/submarine_swaps.py434 async def set_nostr_proof_of_work(self) -> None:CODE
LOWelectrum/lnpeer.py487 def set_gossip_timestamp_filter(self, payload: dict) -> None:CODE
LOWelectrum/txbatcher.py209 def set_password_future(self, password: Optional[str]) -> None:CODE
LOWelectrum/keystore.py250 def update_password(self, old_password, new_password) -> None:CODE
LOWelectrum/keystore.py937 def set_label(self, label: Optional[str]) -> None:CODE
LOWelectrum/daemon.py771 def update_recently_opened_wallets(self, wallet_path, *, remove: bool = False) -> None:CODE
LOWelectrum/wallet_db.py1700 def set_spent_outpoint(self, prevout_hash: str, prevout_n: Union[int, str], tx_hash: str) -> None:CODE
LOWelectrum/wallet_db.py1779 def set_addr_history(self, addr: str, hist) -> None:CODE
LOWelectrum/wallet.py1380 def _update_onchain_invoice_paid_detection(self, invoice_keys: Iterable[str]) -> None:CODE
LOWelectrum/wallet.py2284 def set_reserved_addresses_for_chan(self, chan: 'AbstractChannel', *, reserved: bool) -> None:CODE
LOWelectrum/wallet.py744 def _set_label(self, key: str, value: Optional[str]) -> None:CODE
LOWelectrum/wallet.py2271 def set_reserved_state_of_address(self, addr: str, *, reserved: bool) -> None:CODE
LOWelectrum/wallet.py3010 def _update_invoices_and_reqs_touched_by_tx(self, tx: Transaction) -> None:CODE
LOWelectrum/wallet.py3235 def _update_password_for_keystore(self, old_pw: Optional[str], new_pw: Optional[str]) -> None:CODE
LOWelectrum/wallet.py3407 def _update_keystore(self, keystore: KeyStore) -> None:CODE
LOWelectrum/_vendor/pyperclip/__init__.py745__all__ = ['copy', 'paste', 'waitForPaste', 'waitForNewPaste', 'set_clipboard', 'determine_clipboard']CODE
LOWelectrum/plugins/nwc/nwcserver.py922 def _update_budget_item_amount(self, client_pub: str, *, old_budget_item: list[int], new_msat: int) -> None:CODE
LOWelectrum/plugins/bitbox02/bitbox02.py126 def set_remote_static_pubkey(pubkey: bytes) -> None:CODE
LOWelectrum/plugins/bitbox02/bitbox02.py142 def set_noise_privkey(privkey: bytes) -> None:CODE
LOWelectrum/plugins/bitbox02/bitbox02.py172 def set_app_static_privkey(self, privkey: bytes) -> None:CODE
LOWelectrum/plugins/jade/jadepy/jade.py21logger = logging.getLogger(__name__)CODE
LOWelectrum/plugins/jade/jadepy/jade_serial.py7logger = logging.getLogger(__name__)CODE
LOWelectrum/plugins/jade/jadepy/jade_tcp.py5logger = logging.getLogger(__name__)CODE
13 more matches not shown…
Cross-File Repetition12 hits · 60 pts
SeverityFileLineSnippetContext
HIGHelectrum/plugins/keepkey/clientbase.py0time out the client if the last operation was before cutoff.STRING
HIGHelectrum/plugins/trezor/clientbase.py0time out the client if the last operation was before cutoff.STRING
HIGHelectrum/plugins/safe_t/clientbase.py0time out the client if the last operation was before cutoff.STRING
HIGHelectrum/plugins/keepkey/clientbase.py0clear the session to force pin (and passphrase if enabled) re-entry. does not leak exceptions.STRING
HIGHelectrum/plugins/trezor/clientbase.py0clear the session to force pin (and passphrase if enabled) re-entry. does not leak exceptions.STRING
HIGHelectrum/plugins/safe_t/clientbase.py0clear the session to force pin (and passphrase if enabled) re-entry. does not leak exceptions.STRING
HIGHelectrum/plugins/keepkey/clientbase.py0called when our wallet was closed or the device removed.STRING
HIGHelectrum/plugins/trezor/clientbase.py0called when our wallet was closed or the device removed.STRING
HIGHelectrum/plugins/safe_t/clientbase.py0called when our wallet was closed or the device removed.STRING
HIGHelectrum/plugins/keepkey/qt.py0this dialog doesn't require a device be paired with a wallet. we want users to be able to wipe a device even if they've STRING
HIGHelectrum/plugins/trezor/qt.py0this dialog doesn't require a device be paired with a wallet. we want users to be able to wipe a device even if they've STRING
HIGHelectrum/plugins/safe_t/qt.py0this dialog doesn't require a device be paired with a wallet. we want users to be able to wipe a device even if they've STRING
Decorative Section Separators7 hits · 21 pts
SeverityFileLineSnippetContext
MEDIUMtests/test_verifier.py73 # --------------------------------------------------------COMMENT
MEDIUMtests/test_verifier.py91 # --------------------------------------------------------------------------COMMENT
MEDIUMelectrum/ripemd.py5## ==========COMMENT
MEDIUMelectrum/plugins/digitalbitbox/digitalbitbox.py1# ----------------------------------------------------------------------------------COMMENT
MEDIUMelectrum/plugins/digitalbitbox/digitalbitbox.py57# ----------------------------------------------------------------------------------COMMENT
MEDIUMelectrum/plugins/digitalbitbox/digitalbitbox.py443# ----------------------------------------------------------------------------------COMMENT
MEDIUMelectrum/plugins/jade/jadepy/jade.py83# ----------COMMENT
AI Slop Vocabulary13 hits · 21 pts
SeverityFileLineSnippetContext
MEDIUMcontrib/ban_unicode.py12# the most robust and generic fix seems to be to just ban all unicode usage.COMMENT
LOWcontrib/build-linux/appimage/make_appimage.sh95 # note: could instead just use the libzbar0 pkg from debian/apt, but that is too old and missing fixes for CVE-2023-COMMENT
LOWelectrum/lnutil.py604 max_mask_len = 64 # TODO just use RevocationStore.NUM_BITS + 1 ?CODE
LOWelectrum/onion_message.py88 # dummy hops could be inserted anywhere in the path, but for compatibility just add them at the endCOMMENT
LOWelectrum/lnonion.py662# TODO maybe we should rm this and just use OnionWireSerializer and onion_wire.csvCOMMENT
LOWelectrum/simple_config.py615 if name in ("from_key", ): # don't apply magic, just use standard lookupCODE
LOWelectrum/submarine_swaps.py1522 # note: there is no csv in the script, we just set this so that txbatcher waits for one confirmation.COMMENT
LOWelectrum/wallet.py210 # if no network or not up to date, just set locktime to zeroCOMMENT
MEDIUMelectrum/gui/messages.py24"""Electrum uses static channel backups. If you lose your wallet file, you will need to request your channel to be forceSTRING
MEDIUMelectrum/gui/qml/qeswaphelper.py619 # add more nuanced error reporting?COMMENT
LOWelectrum/gui/qml/qewallet.py194 # and even then, we can probably just add the payment insteadCOMMENT
LOWelectrum/gui/qml/qetransactionlistmodel.py152 # FIXME just use wallet.get_tx_status, and change that as neededCOMMENT
LOWelectrum/gui/qt/amountedit.py140 # if the max precision is simply what unit conversion allows, just returnCOMMENT
AI Structural Patterns24 hits · 16 pts
SeverityFileLineSnippetContext
LOWtests/test_lnpeer.py2318CODE
LOWtests/test_wallet_vertical.py104CODE
LOWtests/test_coinchooser.py34CODE
LOWelectrum/lnchannel.py1931CODE
LOWelectrum/transaction.py2153CODE
LOWelectrum/payment_identifier.py45CODE
LOWelectrum/base_crash_reporter.py128CODE
LOWelectrum/crypto.py336CODE
LOWelectrum/submarine_swaps.py1589CODE
LOWelectrum/lnurl.py175CODE
LOWelectrum/commands.py267CODE
LOWelectrum/commands.py967CODE
LOWelectrum/commands.py999CODE
LOWelectrum/commands.py1192CODE
LOWelectrum/commands.py1452CODE
LOWelectrum/commands.py1476CODE
LOWelectrum/commands.py1500CODE
LOWelectrum/commands.py1744CODE
LOWelectrum/daemon.py397CODE
LOWelectrum/wallet.py1977CODE
LOWelectrum/wallet.py3120CODE
LOWelectrum/plugins/swapserver/__init__.py73CODE
LOWelectrum/gui/qml/qeapp.py200CODE
LOWelectrum/gui/qt/seed_dialog.py80CODE
Cross-Language Confusion3 hits · 15 pts
SeverityFileLineSnippetContext
HIGHelectrum/plugins/labels/qml.py109 self.push(_wallet)CODE
HIGHelectrum/gui/qml/qetypes.py41 self._logger.warning('amount_sat is undefined, returning 0')CODE
HIGHelectrum/gui/qml/qetypes.py54 self._logger.warning('amount_msat is undefined, returning 0')CODE
Dead Code7 hits · 14 pts
SeverityFileLineSnippetContext
MEDIUMelectrum/lnworker.py455CODE
MEDIUMelectrum/lnworker.py456CODE
MEDIUMelectrum/lnworker.py457CODE
MEDIUMelectrum/lnworker.py459CODE
MEDIUMelectrum/lnworker.py464CODE
MEDIUMelectrum/gui/text.py202CODE
MEDIUMelectrum/gui/text.py203CODE
Redundant / Tautological Comments4 hits · 6 pts
SeverityFileLineSnippetContext
LOWelectrum/logging.py113 # Check if captured log lines were never to dumped to e.g. stderr,COMMENT
LOWelectrum/dnssec.py96 # Check if there is a valid signature for the root dnskeyCOMMENT
LOWelectrum/gui/qml/qewallet.py869 # Check if we had enough funds excluding fees,COMMENT
LOWelectrum/gui/qt/send_tab.py264 # Check if we had enough funds excluding fees,COMMENT
Overly Generic Function Names3 hits · 3 pts
SeverityFileLineSnippetContext
LOWtests/toyserver/toyserver.py469 async def handle_request(self, request):CODE
LOWelectrum/interface.py183 async def handle_request(self, request):CODE
LOWelectrum/gui/qt/util.py99 def run_task(self):CODE
Modern AI Meta-Vocabulary1 hit · 3 pts
SeverityFileLineSnippetContext
MEDIUMelectrum/simple_config.py185 # The following two functions are there for dependency injection whenCOMMENT
Slop Phrases1 hit · 3 pts
SeverityFileLineSnippetContext
MEDIUMelectrum/scripts/quick_start.py33# you can use ~CLI commands by accessing command_runnerCOMMENT
TODO Padding1 hit · 2 pts
SeverityFileLineSnippetContext
LOWelectrum/lnurl.py251 # TODO: implement LUD-09 (https://github.com/lnurl/luds/blob/luds/09.md), e.g. useful for paying offline devicesCOMMENT
Fake / Example Data1 hit · 0 pts
SeverityFileLineSnippetContext
LOWtests/test_lnpeer.py415 a_chan, b_chan = await f(last_rev_secret=sha256("fake_data"), **kwargs)CODE