1
0

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)
This commit is contained in:
SomberNight
2025-08-01 18:35:09 +00:00
parent db52ec7798
commit d8a6ed9b55

View File

@@ -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: