lnwallet/btcwallet: use relay fee not tx fee rate for dust check #3218
In this commit we fix a hidden bug in the transaction creating logic
To fix this issue we now properly use the relay fee when computing dust.
The text was updated successfully, but these errors were encountered:
In this commit we fix a hidden bug in the transaction creating logic that was only manifested recently due to higher fees on Bitcoin's mainnet. Before this commit, we would use the target fee rate to determine if an output was dust or not. However, this is incorrect, as instead the relay fee should be used as this matches the policy checks widely deployed in Bitcoin full node today. To fix this issue we now properly use the relay fee when computing dust. This fixes the issue for the `EstimateFee` call, but the `SendOutputs` call also has a similar issue. However, this must be fixed within `btcwallet` itself, so it has been left out of this commit Fixes lightningnetwork#3217.
In this commit, we fix a logic flaw in the testCreateSimpleTx test case which emerged once we the bug fix for dust outputs landed. Before this commit, we would erroneously fail during valid test execution.