spesmilo / spesmilo/electrum

AssertionError: (3, 2)

Open
#7,481 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
8.6k
Forks
3.5k
Avg merge
2d 8h
Merged PRs (30d)
61

Description

Crash Report

This crash report was reported through the automatic crash reporting system 🤖

Traceback

Traceback (most recent call last):
  File "/tmp/.mount_electrtcQHSj/usr/lib/python3.7/site-packages/electrum/gui/qt/main_window.py", line 872, in timer_actions
    self.update_wallet()
  File "/tmp/.mount_electrtcQHSj/usr/lib/python3.7/site-packages/electrum/gui/qt/main_window.py", line 1006, in update_wallet
    self.update_tabs()
  File "/tmp/.mount_electrtcQHSj/usr/lib/python3.7/site-packages/electrum/gui/qt/main_window.py", line 1013, in update_tabs
    self.history_model.refresh('update_tabs')
  File "/tmp/.mount_electrtcQHSj/usr/lib/python3.7/site-packages/electrum/util.py", line 420, in <lambda>
    return lambda *args, **kw_args: do_profile(args, kw_args)
  File "/tmp/.mount_electrtcQHSj/usr/lib/python3.7/site-packages/electrum/util.py", line 416, in do_profile
    o = func(*args, **kw_args)
  File "/tmp/.mount_electrtcQHSj/usr/lib/python3.7/site-packages/electrum/gui/qt/history_list.py", line 278, in refresh
    include_lightning=self.should_include_lightning_payments())
  File "/tmp/.mount_electrtcQHSj/usr/lib/python3.7/site-packages/electrum/util.py", line 420, in <lambda>
    return lambda *args, **kw_args: do_profile(args, kw_args)
  File "/tmp/.mount_electrtcQHSj/usr/lib/python3.7/site-packages/electrum/util.py", line 416, in do_profile
    o = func(*args, **kw_args)
  File "/tmp/.mount_electrtcQHSj/usr/lib/python3.7/site-packages/electrum/wallet.py", line 917, in get_full_history
    for tx_item in onchain_history:
  File "/tmp/.mount_electrtcQHSj/usr/lib/python3.7/site-packages/electrum/wallet.py", line 736, in get_onchain_history
    for hist_item in self.get_history(domain=domain):
  File "/tmp/.mount_electrtcQHSj/usr/lib/python3.7/site-packages/electrum/util.py", line 1150, in func_wrapper
    return func(self, *args, **kwargs)
  File "/tmp/.mount_electrtcQHSj/usr/lib/python3.7/site-packages/electrum/address_synchronizer.py", line 104, in func_wrapper
    return func(self, *args, **kwargs)
  File "/tmp/.mount_electrtcQHSj/usr/lib/python3.7/site-packages/electrum/address_synchronizer.py", line 483, in f
    return func(self, *args, **kwargs)
  File "/tmp/.mount_electrtcQHSj/usr/lib/python3.7/site-packages/electrum/address_synchronizer.py", line 508, in get_history
    fee = self.get_tx_fee(tx_hash)
  File "/tmp/.mount_electrtcQHSj/usr/lib/python3.7/site-packages/electrum/address_synchronizer.py", line 739, in get_tx_fee
    assert num_ismine_inputs <= num_all_inputs, (num_ismine_inputs, num_all_inputs)
AssertionError: (3, 2)

AssertionError: (3, 2)

Reporter

This issue was reported by 2 user(s):

Electrum Version Python Version Operating System Wallet Type Locale Stack
4.1.5 3.7.10 (default, Jun 28 2018, 19:01:02) [GCC 5.4.0 20160609] Linux-5.4.0-81-generic-x86_64-with-debian-buster-sid 2fa en_US
4.7.1 3.12.10 (tags/v3.12.10:0cc8128, Apr 8 2025, 12:21:36) [MSC v.1943 64 bit (AMD64)] Windows-11-10.0.26200-SP0 imported Engli

Additional Information

The reporting user(s) did not provide additional information.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in electrum/address_synchronizer.py at get_tx_fee(), where the assertion compares the number of wallet-owned inputs with all inputs. Trace how get_history() and get_onchain_history() provide transactions to the history view, using the reported stack trace as the entry point. Done means the reported history refresh no longer raises AssertionError and the affected case has regression coverage.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.