From d8a6ed9b55bc7399d13ced3f40f08e17602ab2fc Mon Sep 17 00:00:00 2001 From: SomberNight Date: Fri, 1 Aug 2025 18:35:09 +0000 Subject: [PATCH] bitcoin.py: split dust_threshold from minrelayfee, make it hardcoded instead - the dust threshold in bitcoin core is calculated with a 3 sat/vbyte feerate, which we were interpreting as 3*minrelayfee - and now bitcoin core is considering changing the minrelayfee (1->0.1 s/b), independently from the dust threshold (in https://github.com/bitcoin/bitcoin/pull/33106) --- electrum/bitcoin.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/electrum/bitcoin.py b/electrum/bitcoin.py index 35e17dc39..01440a757 100644 --- a/electrum/bitcoin.py +++ b/electrum/bitcoin.py @@ -347,10 +347,7 @@ DUST_LIMIT_P2WPKH = 294 def dust_threshold(network: 'Network' = None) -> int: """Returns the dust limit in satoshis.""" - # Change <= dust threshold is added to the tx fee - dust_lim = 182 * 3 * relayfee(network) # in msat - # convert to sat, but round up: - return (dust_lim // 1000) + (dust_lim % 1000 > 0) + return DUST_LIMIT_P2PKH def hash_encode(x: bytes) -> str: