multi: thread context through RegisterAttempt method

This commit is contained in:
ziggie committed 2026-02-25 08:02:24 +01:00
1 parent 60026494b1
commit 8bb7150dc2
9 files changed
+70 -42

No files matched your search

+3 -1
View File
@@ -584,6 +584,8 @@ func (p *paymentLifecycle) collectResult(
func (p *paymentLifecycle) registerAttempt(rt *route.Route,
remainingAmt lnwire.MilliSatoshi) (*paymentsdb.HTLCAttempt, error) {
ctx := context.TODO()
// If this route will consume the last remaining amount to send
// to the receiver, this will be our last shard (for now).
isLastAttempt := rt.ReceiverAmt() == remainingAmt
@@ -601,7 +603,7 @@ func (p *paymentLifecycle) registerAttempt(rt *route.Route,
// Switch for its whereabouts. The route is needed to handle the result
// when it eventually comes back.
err = p.router.cfg.Control.RegisterAttempt(
p.identifier, &attempt.HTLCAttemptInfo,
ctx, p.identifier, &attempt.HTLCAttemptInfo,
)
return attempt, err