Merge pull request #2939 from Roasbeef/hodl-htlc-fix
htlcswitch: only perform CLTV checks for HTLCs with open invoices
This commit is contained in:
commit
8418dc5530
@ -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 "+
|
||||
|
Loading…
Reference in New Issue
Block a user