From cf98e99001a02cddc9651cbe4c4069c390256595 Mon Sep 17 00:00:00 2001 From: Joost Jager Date: Fri, 27 Sep 2019 16:29:53 +0200 Subject: [PATCH] htlcswitch: remove source hop check This is already checked in EligibleToForward() --- htlcswitch/switch.go | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/htlcswitch/switch.go b/htlcswitch/switch.go index eb3357e4a..7838fe2b1 100644 --- a/htlcswitch/switch.go +++ b/htlcswitch/switch.go @@ -1036,13 +1036,7 @@ func (s *Switch) handlePacketForward(packet *htlcPacket) error { for _, link := range interfaceLinks { // We'll skip any links that aren't yet eligible for // forwarding. - switch { - case !link.EligibleToForward(): - continue - - // If the link doesn't yet have a source chan ID, then - // we'll skip it as well. - case link.ShortChanID() == hop.Source: + if !link.EligibleToForward() { continue }