paymentsdb: add firstcustom records to unit tests

This commit is contained in:
ziggie committed 2026-02-25 08:02:18 +01:00
1 parent bfd59aac22
commit e40c8df16b
1 file changed
+15 -4
+15 -4
View File
@@ -383,11 +383,22 @@ func genPaymentCreationInfo(t *testing.T,
t.Helper()
// Add constant first hop custom records for testing for testing
// purposes.
firstHopCustomRecords := lnwire.CustomRecords{
lnwire.MinCustomRecordsTlvType + 1: []byte("test_record_1"),
lnwire.MinCustomRecordsTlvType + 2: []byte("test_record_2"),
lnwire.MinCustomRecordsTlvType + 3: []byte{
0x01, 0x02, 0x03, 0x04, 0x05,
},
}
return &PaymentCreationInfo{
PaymentIdentifier: paymentHash,
Value: testRoute.ReceiverAmt(),
CreationTime: time.Unix(time.Now().Unix(), 0),
PaymentRequest: []byte("hola"),
PaymentIdentifier: paymentHash,
Value: testRoute.ReceiverAmt(),
CreationTime: time.Unix(time.Now().Unix(), 0),
PaymentRequest: []byte("hola"),
FirstHopCustomRecords: firstHopCustomRecords,
}
}