File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -342,6 +342,14 @@ func TestBolt4Packet(t *testing.T) {
342342 }
343343}
344344
345+ // TestTLVPayloadMessagePacket tests the creation and encoding of an onion
346+ // message packet that uses a TLV payload for each hop in the route. This test
347+ // uses the test vectors defined in the BOLT 4 specification. The test reads a
348+ // JSON file containing a predefined route, session key, and the expected final
349+ // onion packet. It then constructs the route hop-by-hop, manually creating the
350+ // TLV payload for each, before creating a new onion packet with NewOnionPacket.
351+ // The test concludes by asserting that the newly encoded packet is identical to
352+ // the one specified in the test vector.
345353func TestTLVPayloadMessagePacket (t * testing.T ) {
346354 t .Parallel ()
347355
You can’t perform that action at this time.
0 commit comments