From 6abd539a2d326d4a4adcab791e9c39584c01c3b4 Mon Sep 17 00:00:00 2001 From: ziggie Date: Wed, 13 Aug 2025 14:34:46 +0200 Subject: [PATCH] paymentsdb: add missing function comments --- payments/db/payment_test.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/payments/db/payment_test.go b/payments/db/payment_test.go index ba17dc9a6..ea5fcb8df 100644 --- a/payments/db/payment_test.go +++ b/payments/db/payment_test.go @@ -330,6 +330,7 @@ func assertDBPayments(t *testing.T, paymentDB DB, payments []*payment) { require.Equal(t, payments, p) } +// genPreimage generates a random preimage. func genPreimage() ([32]byte, error) { var preimage [32]byte if _, err := io.ReadFull(rand.Reader, preimage[:]); err != nil { @@ -339,6 +340,7 @@ func genPreimage() ([32]byte, error) { return preimage, nil } +// genInfo generates a payment creation info, an attempt info and a preimage. func genInfo(t *testing.T) (*PaymentCreationInfo, *HTLCAttemptInfo, lntypes.Preimage, error) { @@ -378,6 +380,8 @@ func TestDeleteFailedAttempts(t *testing.T) { }) } +// testDeleteFailedAttempts tests the DeleteFailedAttempts method with the +// given keepFailedPaymentAttempts flag as argument. func testDeleteFailedAttempts(t *testing.T, keepFailedPaymentAttempts bool) { paymentDB := NewTestDB( t, WithKeepFailedPaymentAttempts(keepFailedPaymentAttempts),