Skip to main content

core_dust_threshold_duffs

Function core_dust_threshold_duffs 

Source
pub fn core_dust_threshold_duffs(
    output_script: &Script,
    dust_relay_fee_per_kb: u64,
) -> u64
Expand description

The minimum value in duffs an output paying output_script must carry for Core’s mempool to accept it, at a dust relay fee of dust_relay_fee_per_kb duffs per kilobyte.

Mirrors Core’s GetDustThreshold: the fee, at the dust relay rate, of the serialized output plus the input that would spend it. Unspendable (OP_RETURN) outputs are never dust. At Core’s default 3000 duffs/kB a P2PKH output needs 546 duffs and a P2SH output 540. Dust is a mempool policy, not a consensus rule: a payout below it is refused by every relaying node, but a miner could still include a signed transaction directly.