htlcswitch: relay experimental endorsement signal with update_add_htlc
This commit is contained in:
9 files changed
+134
-11
No files matched your search
@@ -530,9 +530,10 @@ func testForwardInterceptorWireRecords(ht *lntest.HarnessTest) {
|
||||
require.NoError(ht, err, "failed to send request")
|
||||
|
||||
// Assert that the Alice -> Bob custom records in update_add_htlc are
|
||||
// not propagated on the Bob -> Carol link.
|
||||
// not propagated on the Bob -> Carol link, just an endorsement signal.
|
||||
packet = ht.ReceiveHtlcInterceptor(carolInterceptor)
|
||||
require.Len(ht, packet.InWireCustomRecords, 0)
|
||||
require.Equal(ht, lntest.CustomRecordsWithUnendorsed(nil),
|
||||
packet.InWireCustomRecords)
|
||||
|
||||
// We're going to tell Carol to forward 5k sats less to Dave. We need to
|
||||
// set custom records on the HTLC as well, to make sure the HTLC isn't
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in new issue
Block a user