From cbfc7dd42dbd2e86c5440f3af4b987fc97cac704 Mon Sep 17 00:00:00 2001 From: Joost Jager Date: Fri, 24 May 2019 08:57:17 +0200 Subject: [PATCH] routing: check findPath error --- routing/router.go | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/routing/router.go b/routing/router.go index 539bdb4e..8b1fd987 100644 --- a/routing/router.go +++ b/routing/router.go @@ -40,11 +40,6 @@ const ( ) var ( - // ErrNoRouteHopsProvided is returned when a caller attempts to - // construct a new sphinx packet, but provides an empty set of hops for - // each route. - ErrNoRouteHopsProvided = fmt.Errorf("empty route hops provided") - // ErrRouterShuttingDown is returned if the router is in the process of // shutting down. ErrRouterShuttingDown = fmt.Errorf("router shutting down") @@ -1436,6 +1431,9 @@ func (r *ChannelRouter) FindRoute(source, target route.Vertex, }, restrictions, source, target, amt, ) + if err != nil { + return nil, err + } // We'll fetch the current block height so we can properly calculate the // required HTLC time locks within the route.