Skip to content

Commit

Permalink
routing: no MaxNumPaths restriction on FindBlindedPaths
Browse files Browse the repository at this point in the history
  • Loading branch information
MPins committed Dec 5, 2024
1 parent ab4ed7a commit c957d90
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions routing/router.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit c957d90

Please sign in to comment.