From c957d90c5e429ecb4a7c6c026a7c8e78a2fdec71 Mon Sep 17 00:00:00 2001 From: MPins Date: Thu, 5 Dec 2024 11:29:05 -0300 Subject: [PATCH] routing: no MaxNumPaths restriction on FindBlindedPaths --- routing/router.go | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/routing/router.go b/routing/router.go index 9eabe0b2ae..129ce63ca9 100644 --- a/routing/router.go +++ b/routing/router.go @@ -698,18 +698,13 @@ func (r *ChannelRouter) FindBlindedPaths(destination route.Vertex, return routes[i].probability > routes[j].probability }) - // Now just choose the best paths up until the maximum number of allowed - // paths. - bestRoutes := make([]*route.Route, 0, restrictions.MaxNumPaths) + // Retornar todas as rotas + allRoutes := make([]*route.Route, 0, len(routes)) for _, route := range routes { - if len(bestRoutes) >= int(restrictions.MaxNumPaths) { - break - } - - bestRoutes = append(bestRoutes, route.route) + allRoutes = append(allRoutes, route.route) } - return bestRoutes, nil + return allRoutes, nil } // generateNewSessionKey generates a new ephemeral private key to be used for a