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

+3 -1
View File
@@ -2642,7 +2642,7 @@ func (l *channelLink) processRemoteAdds(fwdPkg *channeldb.FwdPkg,
heightNow := l.cfg.Switch.BestHeight()
fwdInfo, err := chanIterator.ForwardingInstructions()
pld, err := chanIterator.HopPayload()
if err != nil {
// If we're unable to process the onion payload, or we
// received invalid onion payload failure, then we
@@ -2671,6 +2671,8 @@ func (l *channelLink) processRemoteAdds(fwdPkg *channeldb.FwdPkg,
continue
}
fwdInfo := pld.ForwardingInfo()
switch fwdInfo.NextHop {
case hop.Exit:
updated, err := l.processExitHop(