HomePhabricator

[electrum] remove "dust_to_fee" ephemeral value

Description

[electrum] remove "dust_to_fee" ephemeral value

Summary:
This value is only needed in a GUI dialog which has all the data it needs to compute it. This removes some coupling between the GUI, transaction.py and coinchooser.py

As a result, methods in coinchooser.py no longer need to forward the dust_threshold constant to each other.

Add typehints and docstrings, and fix comments on touched functions. Remove a couple of debbuging prints.

Note that the unused dust_threshold parameter in CoinChooser.change_amounts is a relic of the original Electrum codebase which has a dust amount value that depends on the network congestion.

Depends on D14420

Test Plan:
Run the application and send a transaction.

python test_runner.py

Reviewers: #bitcoin_abc, Fabien

Reviewed By: #bitcoin_abc, Fabien

Differential Revision: https://reviews.bitcoinabc.org/D14421

Details

Provenance
PiRKAuthored on Aug 28 2023, 15:01
PiRKPushed on Aug 29 2023, 08:34
Reviewer
Restricted Project
Differential Revision
D14421: [electrum] remove "dust_to_fee" ephemeral value
Parents
rABCd10b4d3c45ef: [electrum] access TxOutput value by attribute name rather than index in…
Branches
Unknown
Tags
Unknown