htlcswitch: relay experimental endorsement signal with update_add_htlc

This commit is contained in:
Carla Kirk-Cohen
2024-10-07 13:59:34 -04:00
parent 94f7ed46de
commit 774bfa740a
9 changed files with 134 additions and 11 deletions

View File

@@ -102,9 +102,12 @@ func testInvoiceHtlcModifierBasic(ht *lntest.HarnessTest) {
require.EqualValues(
ht, tc.sendAmountMsat, modifierRequest.ExitHtlcAmt,
)
// Expect custom records plus endorsement signal.
require.Equal(
ht, tc.lastHopCustomRecords,
modifierRequest.ExitHtlcWireCustomRecords,
ht, lntest.CustomRecordsWithUnendorsed(
tc.lastHopCustomRecords,
), modifierRequest.ExitHtlcWireCustomRecords,
)
// For all other packets we resolve according to the test case.
@@ -140,8 +143,9 @@ func testInvoiceHtlcModifierBasic(ht *lntest.HarnessTest) {
require.Len(ht, updatedInvoice.Htlcs, 1)
require.Equal(
ht, tc.lastHopCustomRecords,
updatedInvoice.Htlcs[0].CustomRecords,
ht, lntest.CustomRecordsWithUnendorsed(
tc.lastHopCustomRecords,
), updatedInvoice.Htlcs[0].CustomRecords,
)
// Make sure the custom channel data contains the encoded