mirror of
https://github.com/aljazceru/breez-lnd.git
synced 2025-12-18 22:54:26 +01:00
routing+lnrpc: move default payment timeout out of router
This commit moves the default timeout out of router and thereby fixes a bug that caused SendToRoute to not return the actual error, but a timeout result instead. SendToRoute only tries a single route, so a timeout should never happen.
This commit is contained in:
@@ -182,10 +182,10 @@ func (p *paymentLifecycle) resumePayment() ([32]byte, *route.Route, error) {
|
||||
func (p *paymentLifecycle) createNewPaymentAttempt() (lnwire.ShortChannelID,
|
||||
*lnwire.UpdateAddHTLC, error) {
|
||||
|
||||
// Before we attempt this next payment, we'll check to see if
|
||||
// either we've gone past the payment attempt timeout, or the
|
||||
// router is exiting. In either case, we'll stop this payment
|
||||
// attempt short.
|
||||
// Before we attempt this next payment, we'll check to see if either
|
||||
// we've gone past the payment attempt timeout, or the router is
|
||||
// exiting. In either case, we'll stop this payment attempt short. If a
|
||||
// timeout is not applicable, timeoutChan will be nil.
|
||||
select {
|
||||
case <-p.timeoutChan:
|
||||
// Mark the payment as failed because of the
|
||||
|
||||
Reference in New Issue
Block a user