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
2019-06-07 11:27:55 +02:00
parent e45d4d703a
commit 2e920de292
3 changed files with 25 additions and 20 deletions

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(