mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-08-28 06:32:18 +02:00
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:
@@ -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,
|
||||
},
|
||||
|
Reference in New Issue
Block a user