Ah the answer is in the code I just linked to. It just assumes the unlocking script will be 148 bytes - its hardcoded in!
So I think we can programatically work out the dust limit for any given output script by:
dustLimit = 3 * (lockingScriptSize + 148) * minRelayTxFee / 1000
Ah the answer is in the code I just linked to. It just assumes the unlocking script will be 148 bytes - its hardcoded in!
So I think we can programatically work out the dust limit for any given output script by:
dustLimit = 3 * (lockingScriptSize + 148) * minRelayTxFee / 1000