htlcswitch: return hop.Payload from HopIterator

This commit is contained in:
Conner Fromknecht committed 2019-11-04 15:10:15 -08:00
1 parent 4a6f5d8d3d
commit 70708e2e71
6 files changed
+66 -57

No files matched your search

+2 -1
View File
@@ -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),