mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-03-04 09:48:19 +01:00
routing: fix MC probability order for blinded paths
Fix the blinded path probability sorting function. Also fix the test assertion function.
This commit is contained in:
parent
d77617461d
commit
e47160d257
2 changed files with 2 additions and 2 deletions
|
@ -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
|
||||
|
|
|
@ -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])
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue