lightningj-org/lightningj

Timeout regarding sending payment

Closed this issue · 3 comments

@herrvendil @pvendil @pvendil-vcc @theborakompanioni We encountered a strange case where sending payment using v2 version, we set a setTimeoutSeconds field as 60 seconds. But even after the timeout the send payment occurs. So in what aspect does setTimeoutSeconds works, and what things are we missing. We checked the documentation and it states that timeout second is the upper limit for payment to successfully occurs. But in this case that payment succeeds after the limit too.

@herrvendil @pvendil @pvendil-vcc @theborakompanioni We encountered a strange case where sending payment using v2 version, we set a setTimeoutSeconds field as 60 seconds. But even after the timeout the send payment occurs. So in what aspect does setTimeoutSeconds works, and what things are we missing. We checked the documentation and it states that timeout second is the upper limit for payment to successfully occurs. But in this case that payment succeeds after the limit too.

See lightningnetwork/lnd#4269 (comment)

This is not how the timeout_seconds arguments works. What timeout_seconds defines is the time after which no new payment attempt is made anymore. In any case, the call blocks until the current attempt (or multiple attempts in case of MPP) either failed or settled.

The answer is from May 10, 2020, so might not be valid anymore. I am not too familiar with how to harden your approach, but I'd say, always check PaymentStatus of ListPayments.

@vanditshah99 Can this issue be closed?