AI-generated analysisPublished automatically and not human-verified. Validated context appears in community notes below.
← Watch feed
Informational 12 Bitcoin

sqldb: add queries for deleting a payment and attempts

Public commit record

What the developer wrote

Authored by ziggie

50/100 · Thin
sqldb: add queries for deleting a payment and attempts
✓ Specific, descriptive subject✓ Names a concrete action or component! No meaningful explanatory body
The short version

What changed, and why it matters

This commit adds two new database helper functions for deleting payment records and failed payment attempts in LND's SQL backend. It is purely an infrastructure change: the new functions are defined but not yet called anywhere in the code, so it cannot by itself cause data loss, unauthorized deletion, or any other security issue. It simply prepares the database layer for future features such as payment cleanup or pruning.

Recommended action

No immediate action required. When these helpers are later wired into user-facing RPCs or automated pruning, ensure: (1) the caller manages transactions and foreign-key/ON DELETE behavior for child tables such as payment_htlc_attempts, payment_htlc_attempt_resolutions, payment_hops, and custom records; (2) access is authorized; (3) the magic number 2 for resolution_type is documented or replaced with a named constant; and (4) deletion is auditable.

Security signals we found

01

New DELETE SQL queries added to payments subsystem

02

No callers or authorization logic present in this commit

03

Potential future concern: cascading deletion of related payment_htlc_attempts, custom records, and other child tables not handled here

04

Potential future concern: hard-coded resolution_type = 2 magic number for failed attempts

Risk score

Why this scored 12/100

Our methodology →
Potential impact 0/30
Exploitability 0/25
Stealth signal 0/15
Affected reach 0/15
Confidence 8/10
Evidence quality 4/5
Human-validated context

Community notes

Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.

No validated notes yet.

The AI analysis stands alone for now. Submit a note if you can add evidence or important context.