routing: Add comment to DeleteFailedAttempts func call
What changed, and why it matters
This commit only adds a clarifying comment to existing code. It does not change any program logic, behavior, or security properties. The comment explains that deleting failed payment attempts may be a no-op depending on database options.
No action required. This is a non-functional comment change.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The change is a documentation-only edit in routing/payment_lifecycle.go. It expands an existing inline comment above the DeleteFailedAttempts call to note that the operation may be a no-op when the database backend disallows deletion of failed attempts. No code, control flow, or data handling was modified.
Changed components
routing/payment_lifecycle.goInspect captured patch +3 / −1
diff --git a/routing/payment_lifecycle.go b/routing/payment_lifecycle.go
index cc92a8b..7c9c041 100644
--- a/routing/payment_lifecycle.go
+++ b/routing/payment_lifecycle.go
@@ -326,7 +326,9 @@ lifecycle:
// terminal condition. We either return the settled preimage or the
// payment's failure reason.
//
- // Optionally delete the failed attempts from the database.
+ // Optionally delete the failed attempts from the database. Depends on
+ // the database options deleting attempts is not allowed so this will
+ // just be a no-op.
err = p.router.cfg.Control.DeleteFailedAttempts(p.identifier)
if err != nil {
log.Errorf("Error deleting failed htlc attempts for payment "+
Why this scored 15/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.