diff --git a/routing/router.go b/routing/router.go index 4169548c5..b5bca5d7c 100644 --- a/routing/router.go +++ b/routing/router.go @@ -746,7 +746,7 @@ func (r *ChannelRouter) FindBlindedPaths(destination route.Vertex, // Sort the routes based on probability. sort.Slice(routes, func(i, j int) bool { - return routes[i].probability < routes[j].probability + return routes[i].probability > routes[j].probability }) // Now just choose the best paths up until the maximum number of allowed diff --git a/routing/router_test.go b/routing/router_test.go index 3a9b97d29..fb02024d2 100644 --- a/routing/router_test.go +++ b/routing/router_test.go @@ -3150,7 +3150,7 @@ func TestFindBlindedPathsWithMC(t *testing.T) { } for i, path := range expectedPaths { - require.Equal(t, expectedPaths[i], path) + require.Equal(t, path, actualPaths[i]) } }