htlcswitch: with debughtlc+hodlhtlc mode, skip all HTLC level checks
This commit is contained in:
parent
e34850c7af
commit
703057c821
@ -1414,6 +1414,13 @@ func (l *channelLink) processLockedInHtlcs(
|
|||||||
fwdInfo := chanIterator.ForwardingInstructions()
|
fwdInfo := chanIterator.ForwardingInstructions()
|
||||||
switch fwdInfo.NextHop {
|
switch fwdInfo.NextHop {
|
||||||
case exitHop:
|
case exitHop:
|
||||||
|
if l.cfg.DebugHTLC && l.cfg.HodlHTLC {
|
||||||
|
log.Warnf("hodl HTLC mode enabled, " +
|
||||||
|
"will not attempt to settle " +
|
||||||
|
"HTLC with sender")
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
|
||||||
// First, we'll check the expiry of the HTLC
|
// First, we'll check the expiry of the HTLC
|
||||||
// itself against, the current block height. If
|
// itself against, the current block height. If
|
||||||
// the timeout is too soon, then we'll reject
|
// the timeout is too soon, then we'll reject
|
||||||
@ -1530,13 +1537,6 @@ func (l *channelLink) processLockedInHtlcs(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if l.cfg.DebugHTLC && l.cfg.HodlHTLC {
|
|
||||||
log.Warnf("hodl HTLC mode enabled, " +
|
|
||||||
"will not attempt to settle " +
|
|
||||||
"HTLC with sender")
|
|
||||||
continue
|
|
||||||
}
|
|
||||||
|
|
||||||
preimage := invoice.Terms.PaymentPreimage
|
preimage := invoice.Terms.PaymentPreimage
|
||||||
err = l.channel.SettleHTLC(preimage, pd.HtlcIndex)
|
err = l.channel.SettleHTLC(preimage, pd.HtlcIndex)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
Loading…
Reference in New Issue
Block a user