fix the lsps2 cltv delta check

It was wrongly assumed that the lsp had to enforce a cltv delta +2. It is
actually the recipient creating invoices with a cltv delta +2, but the LSP does
not have anything to do with that.
This commit is contained in:
Jesse de Wit
2024-01-19 16:19:04 +01:00
parent fc6c5982b3
commit 833c79e27f
5 changed files with 6 additions and 78 deletions

View File

@@ -278,9 +278,9 @@ func (i *Interceptor) processPart(payment *paymentState, part *partState) {
}
}
// Make sure the cltv delta is enough (actual cltv delta + 2).
// Make sure the cltv delta is enough.
if int64(part.req.IncomingExpiry)-int64(part.req.OutgoingExpiry) <
int64(i.config.TimeLockDelta)+2 {
int64(i.config.TimeLockDelta) {
i.failPart(payment, part, common.FAILURE_INCORRECT_CLTV_EXPIRY)
return
}