routing: Add context to requestRoute

This commit is contained in:
ziggie committed 2026-02-25 08:02:24 +01:00
1 parent 33597ad35d
commit dfe0c43c7d
2 files changed
+6 -8

No files matched your search

+2 -4
View File
@@ -288,7 +288,7 @@ lifecycle:
}
// Now request a route to be used to create our HTLC attempt.
rt, err := p.requestRoute(ps)
rt, err := p.requestRoute(cleanupCtx, ps)
if err != nil {
return exitWithErr(err)
}
@@ -399,11 +399,9 @@ func (p *paymentLifecycle) checkContext(ctx context.Context) error {
// requestRoute is responsible for finding a route to be used to create an HTLC
// attempt.
func (p *paymentLifecycle) requestRoute(
func (p *paymentLifecycle) requestRoute(ctx context.Context,
ps *paymentsdb.MPPaymentState) (*route.Route, error) {
ctx := context.TODO()
remainingFees := p.calcFeeBudget(ps.FeesPaid)
// Query our payment session to construct a route.