From 475c3b6c0c620dcac8cef614fe3c5fb90ae9f814 Mon Sep 17 00:00:00 2001 From: Olaoluwa Osuntokun Date: Mon, 21 Aug 2017 23:50:56 -0700 Subject: [PATCH] htlcswitch: accept over-paid HTLC's fee-wise MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This commit modifies fee acceptance logic to allow remote nodes to *over pay* for the HTLC’s sent. --- htlcswitch/link.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htlcswitch/link.go b/htlcswitch/link.go index b5af7c15..c6629e5c 100644 --- a/htlcswitch/link.go +++ b/htlcswitch/link.go @@ -1251,7 +1251,7 @@ func (l *channelLink) processLockedInHtlcs( // construct the forwarding information for // this hop. In any case, we'll cancel this // HTLC. - if pd.Amount-expectedFee != fwdInfo.AmountToForward { + if pd.Amount-expectedFee < fwdInfo.AmountToForward { log.Errorf("Incoming htlc(%x) has "+ "insufficient fee: expected "+ "%v, got %v", pd.RHash[:],