From 343a6ed83158919f956b952ac55061f6783c7a6f Mon Sep 17 00:00:00 2001 From: Carla Kirk-Cohen Date: Wed, 1 Nov 2023 15:34:31 -0400 Subject: [PATCH] hltcswitch/hop: add next hop to intermediate hop with custom records Fix our existing test to have a valid intermediate hop that will pass stricter validation. Previously, we did not specify a next channel for an intermediate hop (which violates bolt4). --- htlcswitch/hop/payload_test.go | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/htlcswitch/hop/payload_test.go b/htlcswitch/hop/payload_test.go index 594b98bc5..d52b056c7 100644 --- a/htlcswitch/hop/payload_test.go +++ b/htlcswitch/hop/payload_test.go @@ -168,7 +168,15 @@ var decodePayloadTests = []decodePayloadTest{ { name: "required type in custom range", isFinalHop: false, - payload: []byte{0x02, 0x00, 0x04, 0x00, + payload: []byte{ + // amount + 0x02, 0x00, + // cltv + 0x04, 0x00, + // next hop id + 0x06, 0x08, + 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + // custom 0xfe, 0x00, 0x01, 0x00, 0x00, 0x02, 0x10, 0x11, }, expCustomRecords: map[uint64][]byte{