itest: fix endorsement itests

Due to the signaling period expiring tests had to be adopted bc
they were not taking the activation time period into account.
This commit is contained in:
ziggie committed 2026-01-05 14:28:14 +01:00
1 parent 013f5c93ed
commit 5f30797738
3 files changed
+50 -11

No files matched your search

+14 -3
View File
@@ -432,14 +432,25 @@ func testForwardInterceptorRestart(ht *lntest.HarnessTest) {
// We should get another notification about the held HTLC.
packet = ht.ReceiveHtlcInterceptor(bobInterceptor)
require.Len(ht, packet.InWireCustomRecords, 2)
// Check the expected number of custom records based on whether the
// endorsement experiment is still active.
expectedLen := 1
if lntest.ExperimentalEndorsementActive() {
expectedLen = 2
}
require.Len(ht, packet.InWireCustomRecords, expectedLen)
require.Equal(ht, lntest.CustomRecordsWithUnendorsed(customRecords),
packet.InWireCustomRecords)
// And now we forward the payment at Carol, expecting only an
// endorsement signal in our incoming custom records.
// endorsement signal in our incoming custom records (if the experiment
// is still active).
packet = ht.ReceiveHtlcInterceptor(carolInterceptor)
require.Len(ht, packet.InWireCustomRecords, 1)
expectedCarolLen := 0
if lntest.ExperimentalEndorsementActive() {
expectedCarolLen = 1
}
require.Len(ht, packet.InWireCustomRecords, expectedCarolLen)
err = carolInterceptor.Send(&routerrpc.ForwardHtlcInterceptResponse{
IncomingCircuitKey: packet.IncomingCircuitKey,
Action: actionResume,