Skip to content

Commit bdbcc54

Browse files
committed
paymentsdb: add more comments
1 parent 192302e commit bdbcc54

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

payments/db/sql_converters.go

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,10 @@ func dbPaymentToCreationInfo(paymentIdentifier []byte, amountMsat int64,
2828
copy(identifier[:], paymentIdentifier)
2929

3030
return &PaymentCreationInfo{
31-
PaymentIdentifier: identifier,
32-
Value: lnwire.MilliSatoshi(amountMsat),
31+
PaymentIdentifier: identifier,
32+
Value: lnwire.MilliSatoshi(amountMsat),
33+
// The creation time is stored in the database as UTC but here
34+
// we convert it to local time.
3335
CreationTime: createdAt.Local(),
3436
PaymentRequest: intentPayload,
3537
FirstHopCustomRecords: firstHopCustomRecords,
@@ -207,7 +209,8 @@ func dbDataToRoute(hops []sqlc.FetchHopsForAttemptsRow,
207209
)
208210
}
209211

210-
// Add blinding point if present (only for introduction node).
212+
// Add blinding point if present (only for introduction node
213+
// in blinded route).
211214
if len(hop.BlindingPoint) > 0 {
212215
pubKey, err := btcec.ParsePubKey(hop.BlindingPoint)
213216
if err != nil {

0 commit comments

Comments
 (0)