Page MenuHomePhabricator

[electrum] move DUST_THRESHOLD constant to transaction.py
ClosedPublic

Authored by PiRK on Aug 28 2023, 15:36.

Details

Reviewers
Fabien
Group Reviewers
Restricted Project
Commits
rABCe83fee2c76a5: [electrum] move DUST_THRESHOLD constant to transaction.py
Summary

Most modules that use this constant already import stuff from transaction.py, which tells us that it is a good place to define this value.

Depends on D14421

Test Plan

python test_runner.py

Run the application to detect potential import errors.

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

PiRK requested review of this revision.Aug 28 2023, 15:36
Fabien added a subscriber: Fabien.
Fabien added inline comments.
electrum/electrumabc/network.py
50 ↗(On Diff #41974)

Why does network.py need DUST_THRESHOLD to begin with ?

This revision is now accepted and ready to land.Aug 29 2023, 07:44
electrum/electrumabc/network.py
50 ↗(On Diff #41974)

Why does network.py need DUST_THRESHOLD to begin with ?

It is just to be helpful in an log messages and gui errors if the server refuses to broadcast the transaction.
https://github.com/Electron-Cash/Electron-Cash/commit/7cbbbacf2ca11c1a758e690b8b8f6577e328f8cc#diff-6e1576a0452fa143a49e3524e25016c7616e2dd0199e3fcc8e0c93a72c0219bdR1562