Skip to content

Commit

Permalink
routing: improve loggings for attempt result handling
Browse files Browse the repository at this point in the history
  • Loading branch information
yyforyongyu committed Oct 14, 2024
1 parent e8c38af commit 930fadf
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions routing/payment_lifecycle.go
Original file line number Diff line number Diff line change
Expand Up @@ -803,8 +803,8 @@ func (p *paymentLifecycle) handleSwitchErr(attempt *channeldb.HTLCAttempt,
// case we can safely send a new payment attempt, and wait for its
// result to be available.
if errors.Is(sendErr, htlcswitch.ErrPaymentIDNotFound) {
log.Debugf("Attempt ID %v for payment %v not found in the "+
"Switch, retrying.", attempt.AttemptID, p.identifier)
log.Warnf("Failing attempt=%v for payment=%v as it's not "+
"found in the Switch", attempt.AttemptID, p.identifier)

return p.failAttempt(attemptID, sendErr)
}
Expand Down Expand Up @@ -1083,6 +1083,9 @@ func (p *paymentLifecycle) processSwitchResults() error {
// means the payment lifecycle needs to be terminated.
_, err := p.handleAttemptResult(a, result)
if err != nil {
log.Errorf("Error handling result for attempt=%v in "+
"payment%v: %v", a.AttemptID, p.identifier, err)

errReturned = err
}

Expand Down

0 comments on commit 930fadf

Please sign in to comment.