htlcswitch: return hop.Payload from HopIterator
This commit is contained in:
6 files changed
+66
-57
No files matched your search
@@ -85,12 +85,13 @@ func TestSphinxHopIteratorForwardingInstructions(t *testing.T) {
|
||||
for i, testCase := range testCases {
|
||||
iterator.processedPacket = testCase.sphinxPacket
|
||||
|
||||
fwdInfo, err := iterator.ForwardingInstructions()
|
||||
pld, err := iterator.HopPayload()
|
||||
if err != nil {
|
||||
t.Fatalf("#%v: unable to extract forwarding "+
|
||||
"instructions: %v", i, err)
|
||||
}
|
||||
|
||||
fwdInfo := pld.ForwardingInfo()
|
||||
if fwdInfo != testCase.expectedFwdInfo {
|
||||
t.Fatalf("#%v: wrong fwding info: expected %v, got %v",
|
||||
i, spew.Sdump(testCase.expectedFwdInfo),
|
||||
|
||||
Reference in new issue
Block a user