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:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user