htlcswitch: accept over-paid HTLC's fee-wise

This commit modifies fee acceptance logic to allow remote nodes to
*over pay* for the HTLC’s sent.
This commit is contained in:
Olaoluwa Osuntokun 2017-08-21 23:50:56 -07:00
parent 4d92d23762
commit 475c3b6c0c
No known key found for this signature in database
GPG Key ID: 9CC5B105D03521A2

@ -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[:],