lnwallet/channel: correct dust calculation on incoming HTLC

Similar to the previous commit, we fix a bug resulting in the wrong
commit weight being calculated when an HTLC just above the remote's
duslimit was added from the remote. This was a result of using the
successFee instead of the timeoutFee when checking whether it was dust,
making us consider it dust when it shouldn't have been.
This commit is contained in:
Johan T. Halseth committed 2020-11-13 12:02:03 +01:00
1 parent e0b133297d
commit 953443e10c
2 files changed
+28 -1

No files matched your search

+1 -1
View File
@@ -4031,7 +4031,7 @@ func (lc *LightningChannel) computeView(view *htlcView, remoteChain bool,
}
for _, htlc := range filteredHTLCView.theirUpdates {
if htlcIsDust(
lc.channelState.ChanType, !remoteChain, !remoteChain,
lc.channelState.ChanType, true, !remoteChain,
feePerKw, htlc.Amount.ToSatoshis(), dustLimit,
) {
continue