lnwire: add ExtraOpaqueData helper functions and methods

Introduces a couple of new helper functions for both the ExtraOpaqueData
and CustomRecords types along with new methods on the ExtraOpaqueData.
This commit is contained in:
ffranr authored and Oliver Gugger committed 2024-09-05 11:18:15 +02:00
1 parent 17c0a70b07
commit af50694643
4 files changed
+596 -76

No files matched your search

+2 -4
View File
@@ -144,10 +144,8 @@ func TestCustomRecordsExtendRecordProducers(t *testing.T) {
for _, tc := range testCases {
t.Run(tc.name, func(t *testing.T) {
nonCustomRecords := tlv.MapToRecords(tc.existingTypes)
nonCustomProducers := fn.Map(
func(r tlv.Record) tlv.RecordProducer {
return &recordProducer{r}
}, nonCustomRecords,
nonCustomProducers := RecordsAsProducers(
nonCustomRecords,
)
combined, err := tc.customRecords.ExtendRecordProducers(