htlcswitch/test: add sphinx action to decoding test

Update test to include the sphinx action to more closely represent
reality. This will be required when we add more validation to the
presence of a nextChanID field. A MoreHops action is chose because
we're testing the case with a payload that contains forwarding info.
This commit is contained in:
Carla Kirk-Cohen
2023-11-01 15:24:57 -04:00
parent b0870ea2ed
commit fa78d21975

View File

@@ -65,14 +65,16 @@ func TestSphinxHopIteratorForwardingInstructions(t *testing.T) {
},
expectedFwdInfo: expectedFwdInfo,
},
// A TLV payload, we can leave off the action as we'll always
// read the cid encoded.
// A TLV payload, which includes the sphinx action as
// cid may be zero for blinded routes (thus we require the
// action to signal whether we are at the final hop).
{
sphinxPacket: &sphinx.ProcessedPacket{
Payload: sphinx.HopPayload{
Type: sphinx.PayloadTLV,
Payload: b.Bytes(),
},
Action: sphinx.MoreHops,
},
expectedFwdInfo: expectedFwdInfo,
},