What changed, and why it matters
This commit only adds explanatory comments to two source files. No code behavior is changed, so it cannot introduce or fix a security vulnerability on its own.
No security action needed; treat as routine documentation-only change.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The diff adds three comment blocks: one in router_backend.go explaining that AMP payments show only the last HTLC preimage due to differing hashes, and two in sql_converters.go noting UTC-to-local time conversion and clarifying the blinding point applies to the introduction node in a blinded route. There are no functional code changes.
Changed components
lnrpc/routerrpc/router_backend.gopayments/db/sql_converters.goInspect captured patch +10 / −3
diff --git a/lnrpc/routerrpc/router_backend.go b/lnrpc/routerrpc/router_backend.go
index d8c8a17..3085f58 100644
--- a/lnrpc/routerrpc/router_backend.go
+++ b/lnrpc/routerrpc/router_backend.go
@@ -1767,6 +1767,10 @@ func (r *RouterBackend) MarshallPayment(payment *paymentsdb.MPPayment) (
// If any of the htlcs have settled, extract a valid
// preimage.
if htlc.Settle != nil {
+ // For AMP payments all hashes will be different so we
+ // will only show the last htlc preimage, this is a
+ // current limitation for AMP payments because for
+ // MPP payments all hashes are the same.
preimage = htlc.Settle.Preimage
fee += htlc.Route.TotalFees()
}
diff --git a/payments/db/sql_converters.go b/payments/db/sql_converters.go
index fd0cad2..66f3b1d 100644
--- a/payments/db/sql_converters.go
+++ b/payments/db/sql_converters.go
@@ -27,8 +27,10 @@ func dbPaymentToCreationInfo(paymentIdentifier []byte, amountMsat int64,
copy(identifier[:], paymentIdentifier)
return &PaymentCreationInfo{
- PaymentIdentifier: identifier,
- Value: lnwire.MilliSatoshi(amountMsat),
+ PaymentIdentifier: identifier,
+ Value: lnwire.MilliSatoshi(amountMsat),
+ // The creation time is stored in the database as UTC but here
+ // we convert it to local time.
CreationTime: createdAt.Local(),
PaymentRequest: intentPayload,
FirstHopCustomRecords: firstHopCustomRecords,
@@ -205,7 +207,8 @@ func dbDataToRoute(hops []sqlc.FetchHopsForAttemptsRow,
)
}
- // Add blinding point if present (only for introduction node).
+ // Add blinding point if present (only for introduction node
+ // in blinded route).
if len(hop.BlindingPoint) > 0 {
pubKey, err := btcec.ParsePubKey(hop.BlindingPoint)
if err != nil {
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.