mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-03-04 09:48:19 +01: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:
parent
b0870ea2ed
commit
fa78d21975
1 changed files with 4 additions and 2 deletions
|
@ -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,
|
||||
},
|
||||
|
|
Loading…
Add table
Reference in a new issue