Merge pull request #2939 from Roasbeef/hodl-htlc-fix

htlcswitch: only perform CLTV checks for HTLCs with open invoices
This commit is contained in:
Olaoluwa Osuntokun authored and GitHub committed 2019-04-15 12:52:45 -07:00
commit 8418dc5530
1 file changed
+1 -1
+1 -1
View File
@@ -2792,7 +2792,7 @@ func (l *channelLink) processExitHop(pd *lnwallet.PaymentDescriptor,
expectedHeight := heightNow + minCltvDelta
switch {
case !l.cfg.DebugHTLC &&
invoice.Terms.State != channeldb.ContractAccepted &&
invoice.Terms.State == channeldb.ContractOpen &&
pd.Timeout < expectedHeight:
log.Errorf("Incoming htlc(%x) has an expiration that is too "+