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:
2 files changed
+28
-1
No files matched your search
+1
-1
@@ -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
|
||||
|
||||
Reference in new issue
Block a user