spesmilo / spesmilo/electrum

Qt: large number in feerate_e raises InvalidOperation

Open
#4,518 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug 🐞
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

  File "Electrum-3.2.2-py3.6.egg/electrum_gui/qt/main_window.py", line 645, in timer_actions
  File "Electrum-3.2.2-py3.6.egg/electrum_gui/qt/main_window.py", line 1303, in do_update_fee
  File "Electrum-3.2.2-py3.6.egg/electrum_gui/qt/main_window.py", line 1451, in get_send_fee_estimator
  File "Electrum-3.2.2-py3.6.egg/electrum_gui/qt/amountedit.py", line 124, in get_amount
  File "Electrum-3.2.2-py3.6.egg/electrum/util.py", line 496, in quantize_feerate

InvalidOperation: [<class 'decimal.InvalidOperation'>]

Reporter

This issue was reported by 14 user(s):

Electrum Version Python Version Operating System Wallet Type Locale Stack
3.2.2 Darwin-16.7.0-x86_64-i386-64bit standard ?
3.2.2 Windows-10-10.0.17134 standard ru_RU
3.3.8 3.6.8 (tags/v3.6.8:3c6b436a57, Dec 23 2018, 23:31:17) [MSC v.1916 32 bit (Intel)] Windows-10-10.0.18362-SP0 standard en_US
4.0.9 3.7.9 (tags/v3.7.9:13c94747c7, Aug 17 2020, 18:01:55) [MSC v.1900 32 bit (Intel)] Windows-10-10.0.19041-SP0 standard sv_SE
4.0.9 3.7.9 (tags/v3.7.9:13c94747c7, Aug 17 2020, 18:01:55) [MSC v.1900 32 bit (Intel)] Windows-10-10.0.19041-SP0 standard sv_SE
4.1.2 3.8.8 (tags/v3.8.8:024d805, Feb 19 2021, 13:08:11) [MSC v.1928 32 bit (Intel)] Windows-10-10.0.21364-SP0 2fa hu_HU
4.1.2 3.8.8 (tags/v3.8.8:024d805, Feb 19 2021, 13:08:11) [MSC v.1928 32 bit (Intel)] Windows-7-6.1.7601-SP1 imported ru_RU
4.1.2 3.8.8 (tags/v3.8.8:024d805, Feb 19 2021, 13:08:11) [MSC v.1928 32 bit (Intel)] Windows-7-6.1.7601-SP1 imported ru_RU
4.1.2 3.8.8 (tags/v3.8.8:024d805, Feb 19 2021, 13:08:11) [MSC v.1928 32 bit (Intel)] Windows-10-10.0.19041-SP0 standard de_DE
4.1.5 3.8.8 (tags/v3.8.8:024d805, Feb 19 2021, 13:08:11) [MSC v.1928 32 bit (Intel)] Windows-10-10.0.14393-SP0 standard ru_RU
4.3.2 3.9.11 (tags/v3.9.11:2de452f, Mar 16 2022, 14:21:37) [MSC v.1929 32 bit (Intel)] Windows-10-10.0.19045-SP0 standard en_US
4.3.2 3.9.11 (tags/v3.9.11:2de452f, Mar 16 2022, 14:21:37) [MSC v.1929 32 bit (Intel)] Windows-10-10.0.19045-SP0 standard en_US
4.3.2 3.9.11 (tags/v3.9.11:2de452f, Mar 16 2022, 14:21:37) [MSC v.1929 32 bit (Intel)] Windows-10-10.0.19045-SP0 standard en_US
4.3.2 3.9.11 (tags/v3.9.11:2de452f, Mar 16 2022, 14:21:37) [MSC v.1929 32 bit (Intel)] Windows-10-10.0.19045-SP0 standard en_US

Additional Information

I set the fee to 10000000000000000000000000000 (holding 0) result in a crash


entered in large amount for feeeeeeeeeee


Locale: sv_SE


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 with electrum_gui/qt/amountedit.py at get_amount, then follow the traceback into electrum/util.py at quantize_feerate and the fee-update path in electrum_gui/qt/main_window.py. Reproduce the crash with the very large feerate value reported and verify that entering it no longer raises decimal.InvalidOperation.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
desktop
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.