Repository Analysis

spesmilo/electrum

Electrum Bitcoin Wallet

17.1 Moderate AI signal View on GitHub

Analysis Overview

This report presents the forensic synthetic code analysis of spesmilo/electrum, a Python project with 8,510 GitHub stars. SynthScan v2.0 examined 182,994 lines of code across 519 source files, recording 2974 pattern matches distributed across 20 syntactic categories. The overall adjusted score of 17.1 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.1
Adjusted Score
17.1
Raw Score
100%
Time Factor
2026-07-14
Last Push
8.5K
Stars
Python
Language
183.0K
Lines of Code
519
Files
3.0K
Pattern Hits
2026-07-14
Scan Date
0.05
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 12HIGH 15MEDIUM 116LOW 2831

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 2974 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 Identifiers1213 hits · 1157 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.py475 def my_on_onion_message_received_unsolicited(*args, **kwargs):CODE
LOWtests/test_onion_message.py494 async def test_get_blinded_paths_to_me_payment(self):CODE
LOWtests/test_onion_message.py532 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
1153 more matches not shown…
Unused Imports766 hits · 682 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.py6CODE
LOWtests/test_lnwallet.py9CODE
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.py4CODE
LOWtests/test_lnrouter.py8CODE
LOWtests/test_lnrouter.py17CODE
LOWtests/test_bolt11.py5CODE
LOWtests/test_bolt11.py10CODE
LOWtests/test_bolt11.py12CODE
LOWtests/test_lnpeer.py3CODE
LOWtests/test_lnpeer.py5CODE
LOWtests/test_lnpeer.py8CODE
LOWtests/test_lnpeer.py9CODE
LOWtests/test_lnpeer.py11CODE
LOWtests/test_lnpeer.py12CODE
LOWtests/test_lnpeer.py13CODE
LOWtests/test_lnpeer.py15CODE
LOWtests/test_lnpeer.py15CODE
LOWtests/test_lnpeer.py15CODE
LOWtests/test_lnpeer.py15CODE
LOWtests/test_lnpeer.py20CODE
LOWtests/test_lnpeer.py20CODE
LOWtests/test_lnpeer.py21CODE
LOWtests/test_lnpeer.py28CODE
LOWtests/test_lnpeer.py29CODE
LOWtests/test_lnpeer.py30CODE
LOWtests/test_lnpeer.py30CODE
LOWtests/test_lnpeer.py31CODE
LOWtests/test_lnpeer.py34CODE
LOWtests/test_lnpeer.py35CODE
LOWtests/test_lnpeer.py35CODE
LOWtests/test_lnpeer.py35CODE
LOWtests/test_lnpeer.py39CODE
LOWtests/test_lnpeer.py39CODE
LOWtests/test_lnpeer.py41CODE
LOWtests/test_lnpeer.py43CODE
LOWtests/test_lnpeer.py43CODE
LOWtests/test_lnpeer.py46CODE
LOWtests/test_lnpeer.py53CODE
LOWtests/test_lnpeer.py53CODE
LOWtests/test_lnpeer.py55CODE
LOWtests/test_lnpeer.py55CODE
LOWtests/test_lnpeer.py57CODE
706 more matches not shown…
Excessive Try-Catch Wrapping431 hits · 483 pts
SeverityFileLineSnippetContext
LOWtests/test_lnutil.py483 except Exception as e:CODE
LOWtests/test_lnutil.py505 except Exception as e:CODE
LOWtests/test_jsondb.py32 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
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.py295 except Exception as e:CODE
LOWelectrum/logging.py362 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.py439def json_encode(obj):CODE
MEDIUMelectrum/util.py1128def run_with_except_hook(*args2, **kwargs2):CODE
MEDIUMelectrum/util.py1148def read_json_file(path):CODE
LOWelectrum/util.py389 except Exception as e:CODE
LOWelectrum/util.py450 except Exception:CODE
LOWelectrum/util.py558 except Exception as e:CODE
LOWelectrum/util.py637 except Exception:CODE
LOWelectrum/util.py730 except Exception:CODE
LOWelectrum/util.py744 except Exception:CODE
LOWelectrum/util.py1108 except Exception:CODE
LOWelectrum/util.py1131 except Exception:CODE
LOWelectrum/util.py1239 except Exception as e:CODE
LOWelectrum/util.py1558 except Exception as e:CODE
LOWelectrum/util.py1718 except Exception as e:CODE
LOWelectrum/util.py2320 except Exception as e:CODE
LOWelectrum/channel_db.py190 except Exception:CODE
LOWelectrum/channel_db.py847 except Exception:CODE
LOWelectrum/bitcoin.py659 except Exception as e:CODE
LOWelectrum/bitcoin.py708 except Exception as e:CODE
LOWelectrum/bitcoin.py717 except Exception as e:CODE
LOWelectrum/bitcoin.py727 except Exception as e:CODE
LOWelectrum/bitcoin.py892 except Exception as e:CODE
MEDIUMelectrum/transaction.py637def read_compact_size(self):CODE
MEDIUMelectrum/transaction.py1471def get_fee(self) -> Optional[int]:CODE
LOWelectrum/transaction.py1303 except Exception as e:CODE
LOWelectrum/transaction.py1500 except Exception:CODE
LOWelectrum/transaction.py1505 except Exception:CODE
LOWelectrum/transaction.py1511 except Exception:CODE
LOWelectrum/transaction.py672 except Exception as e:CODE
LOWelectrum/transaction.py1548 except Exception as e:CODE
LOWelectrum/constants.py41 except Exception:CODE
LOWelectrum/qrscanner.py98 except Exception:CODE
MEDIUMelectrum/interface.py330def create_connection(self):CODE
MEDIUMelectrum/interface.py731def run(self):CODE
LOWelectrum/interface.py150 except Exception:CODE
LOWelectrum/interface.py191 except Exception as e:CODE
LOWelectrum/interface.py467 except Exception as e:CODE
LOWelectrum/interface.py670 except Exception as e:CODE
LOWelectrum/interface.py1385 except Exception as e:CODE
LOWelectrum/json_db.py124 except Exception:CODE
LOWelectrum/json_db.py147 except Exception as e:CODE
LOWelectrum/json_db.py154 except Exception:CODE
371 more matches not shown…
Deep Nesting227 hits · 170 pts
SeverityFileLineSnippetContext
LOWtests/test_transaction.py250CODE
LOWtests/test_wallet_vertical.py3428CODE
LOWtests/test_lnutil.py91CODE
LOWtests/test_lnutil.py813CODE
LOWtests/lnhelpers.py235CODE
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.py86CODE
LOWelectrum/lnsweep.py519CODE
LOWelectrum/lnutil.py982CODE
LOWelectrum/lnutil.py1576CODE
LOWelectrum/version.py13CODE
LOWelectrum/onion_message.py264CODE
LOWelectrum/onion_message.py410CODE
LOWelectrum/x509.py187CODE
LOWelectrum/lnchannel.py348CODE
LOWelectrum/lnchannel.py403CODE
LOWelectrum/util.py682CODE
LOWelectrum/util.py929CODE
LOWelectrum/util.py1783CODE
LOWelectrum/util.py2052CODE
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.py1747CODE
LOWelectrum/transaction.py1787CODE
LOWelectrum/transaction.py2145CODE
LOWelectrum/transaction.py2228CODE
LOWelectrum/transaction.py2550CODE
LOWelectrum/qrscanner.py89CODE
LOWelectrum/interface.py177CODE
LOWelectrum/interface.py770CODE
LOWelectrum/interface.py1137CODE
LOWelectrum/lnrouter.py528CODE
LOWelectrum/lnhtlc.py213CODE
LOWelectrum/payment_identifier.py192CODE
LOWelectrum/payment_identifier.py216CODE
LOWelectrum/payment_identifier.py315CODE
LOWelectrum/payment_identifier.py531CODE
LOWelectrum/address_synchronizer.py282CODE
LOWelectrum/address_synchronizer.py664CODE
LOWelectrum/address_synchronizer.py713CODE
LOWelectrum/address_synchronizer.py897CODE
LOWelectrum/address_synchronizer.py963CODE
167 more matches not shown…
Hallucination Indicators12 hits · 140 pts
SeverityFileLineSnippetContext
CRITICALelectrum/wizard.py886 if self._daemon.config.cv.NETWORK_AUTO_CONNECT.is_modifiable():CODE
CRITICALelectrum/plugins/nwc/nwcserver.py595 "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 self._wallet.wallet.lnworker.swap_manager.cancel_normal_swap(self._swap)CODE
CRITICALelectrum/gui/qml/qeswaphelper.py695 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.py418 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 Block144 hits · 136 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.py241COMMENT
LOWelectrum/pem.py1#!/usr/bin/env pythonCOMMENT
LOWelectrum/lnverifier.py1# -*- coding: utf-8 -*-COMMENT
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/old_mnemonic.py1#!/usr/bin/env pythonCOMMENT
LOWelectrum/util.py1# Electrum - lightweight Bitcoin clientCOMMENT
LOWelectrum/util.py1441# async with timeout_after(0.1):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.py1041 async def monitor_connection(self):COMMENT
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 # being is_mine, as we roll the gap_limit forwardCOMMENT
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/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/submarine_swaps.py61 from aiohttp_socks import ProxyConnectorCOMMENT
LOWelectrum/lnpeer.py501 originator = sorted(self.node_ids)[flags & FLAG_DIRECTION]COMMENT
LOWelectrum/lnpeer.py761 # note: implementations behave differently...COMMENT
LOWelectrum/txbatcher.py1# This class batches outgoing payments and incoming utxo sweeps.COMMENT
LOWelectrum/txbatcher.py21# output 3: tx1''(o1,o2,o3) \ ---> tx2'(tx1|o2,o3) ----> tx3(tx2|o3) (if tx2 is mined)COMMENT
LOWelectrum/txbatcher.py41# if cannot_rbf(tx1') -> broadcast tx3(tx1'|o3)COMMENT
LOWelectrum/dnssec.py1#!/usr/bin/env pythonCOMMENT
LOWelectrum/commands.py1#!/usr/bin/env pythonCOMMENT
LOWelectrum/coinchooser.py1#!/usr/bin/env pythonCOMMENT
84 more matches not shown…
Self-Referential Comments38 hits · 124 pts
SeverityFileLineSnippetContext
MEDIUMtests/test_lnchannel.py97 # Create a test channel which will be used for the duration of thisCOMMENT
MEDIUMelectrum/lnchannel.py1921 # This method is used both in the GUI, and in lnpeer.schedule_force_closingCOMMENT
MEDIUMelectrum/lnworker.py3330 # 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.py4067 """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.py105 # Create a QImage to draw onCOMMENT
MEDIUMelectrum/gui/common_qt/util.py111 # 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 Boilerplate67 hits · 64 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.py1777 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.py2462 def set_rbf(self, rbf: bool) -> None:CODE
LOWelectrum/transaction.py2550 def update_signatures(self, signatures: Sequence[Union[bytes, None]]) -> None:CODE
LOWelectrum/constants.py94 def set_as_network(cls) -> 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.py698 def _update_stored_local_height(self) -> None:CODE
LOWelectrum/simple_config.py241 def set_chain_config_opt_based_on_android_packagename(cls, config_options: dict[str, Any]) -> None:CODE
LOWelectrum/simple_config.py281 def set_key(self, key: Union[str, ConfigVar, ConfigVarWithConfig], value, *, save=True) -> None:CODE
LOWelectrum/simple_config.py301 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.py3108 def set_invoice_status(self, key: str, status: int) -> None:CODE
LOWelectrum/lnworker.py3120 def set_request_status(self, payment_hash: bytes, status: int) -> None:CODE
LOWelectrum/lnworker.py3130 def set_payment_status(self, payment_hash: bytes, status: int, *, direction: lnutil.Direction) -> None:CODE
LOWelectrum/network.py717 def _set_default_server(self) -> None:CODE
LOWelectrum/network.py824 def set_server_bookmark(self, server: ServerAddr, *, add: bool) -> None:CODE
LOWelectrum/i18n.py116def set_language(x: Optional[str]) -> None:CODE
LOWelectrum/blockchain.py302 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.py422 async def set_nostr_proof_of_work(self) -> None:CODE
LOWelectrum/lnpeer.py482 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/wallet_db.py1699 def set_spent_outpoint(self, prevout_hash: str, prevout_n: Union[int, str], tx_hash: str) -> None:CODE
LOWelectrum/wallet_db.py1778 def set_addr_history(self, addr: str, hist) -> None:CODE
LOWelectrum/wallet.py1378 def _update_onchain_invoice_paid_detection(self, invoice_keys: Iterable[str]) -> None:CODE
LOWelectrum/wallet.py2282 def set_reserved_addresses_for_chan(self, chan: 'AbstractChannel', *, reserved: bool) -> None:CODE
LOWelectrum/wallet.py742 def _set_label(self, key: str, value: Optional[str]) -> None:CODE
LOWelectrum/wallet.py2269 def set_reserved_state_of_address(self, addr: str, *, reserved: bool) -> None:CODE
LOWelectrum/wallet.py3007 def _update_invoices_and_reqs_touched_by_tx(self, tx: Transaction) -> None:CODE
LOWelectrum/wallet.py3232 def _update_password_for_keystore(self, old_pw: Optional[str], new_pw: Optional[str]) -> None:CODE
LOWelectrum/wallet.py3325 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.py918 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
LOWelectrum/hw_wallet/trezor_qt_pinmatrix.py84 def _set_strength(self, strength: float) -> None:CODE
LOWelectrum/hw_wallet/plugin.py324 def update_status(self, paired: bool) -> None:CODE
LOWelectrum/gui/qml/qeapp.py286 def _set_screen_brightness(self, br: float) -> None:CODE
LOWelectrum/gui/qt/main_window.py1884 def set_coincontrol_msg(self, msg: Optional[str]) -> None:CODE
LOWelectrum/gui/qt/swap_dialog.py373 def update_fee(self, tx: Optional[PartialTransaction]) -> None:CODE
LOWelectrum/gui/qt/swap_dialog.py419 def update_tx(self) -> None:CODE
7 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 Vocabulary12 hits · 20 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/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.py600 if name in ("from_key", ): # don't apply magic, just use standard lookupCODE
LOWelectrum/submarine_swaps.py608 # note: there is no csv in the script, we just set this so that txbatcher waits for one confirmationCOMMENT
LOWelectrum/wallet.py208 # 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.py190 # and even then, we can probably just add the payment insteadCOMMENT
LOWelectrum/gui/qml/qetransactionlistmodel.py151 # 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 · 18 pts
SeverityFileLineSnippetContext
LOWtests/test_lnpeer.py2398CODE
LOWtests/test_wallet_vertical.py104CODE
LOWtests/test_coinchooser.py34CODE
LOWelectrum/lnchannel.py1906CODE
LOWelectrum/transaction.py2143CODE
LOWelectrum/payment_identifier.py45CODE
LOWelectrum/base_crash_reporter.py128CODE
LOWelectrum/crypto.py332CODE
LOWelectrum/submarine_swaps.py1528CODE
LOWelectrum/lnurl.py175CODE
LOWelectrum/commands.py264CODE
LOWelectrum/commands.py949CODE
LOWelectrum/commands.py981CODE
LOWelectrum/commands.py1174CODE
LOWelectrum/commands.py1438CODE
LOWelectrum/commands.py1462CODE
LOWelectrum/commands.py1486CODE
LOWelectrum/commands.py1730CODE
LOWelectrum/daemon.py397CODE
LOWelectrum/wallet.py1975CODE
LOWelectrum/wallet.py3117CODE
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.py454CODE
MEDIUMelectrum/lnworker.py455CODE
MEDIUMelectrum/lnworker.py456CODE
MEDIUMelectrum/lnworker.py458CODE
MEDIUMelectrum/lnworker.py463CODE
MEDIUMelectrum/gui/text.py202CODE
MEDIUMelectrum/gui/text.py203CODE
Redundant / Tautological Comments4 hits · 6 pts
SeverityFileLineSnippetContext
LOWelectrum/logging.py112 # 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.py856 # 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.py467 async def handle_request(self, request):CODE
LOWelectrum/interface.py177 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.py585 a_chan, b_chan = await f(last_rev_secret=sha256("fake_data"), **kwargs)CODE