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:
Joost Jager committed 2019-06-11 08:36:17 +02:00
1 parent e45d4d703a
commit 2e920de292
3 files changed
+25 -20

No files matched your search

+1
View File
@@ -3070,6 +3070,7 @@ func (r *rpcServer) dispatchPaymentIntent(
RouteHints: payIntent.routeHints,
OutgoingChannelID: payIntent.outgoingChannelID,
PaymentRequest: payIntent.payReq,
PayAttemptTimeout: routing.DefaultPayAttemptTimeout,
}
preImage, route, routerErr = r.server.chanRouter.SendPayment(