Merge pull request #8976 from ellemouton/rb-follow-ups

route blinding: follow ups
This commit is contained in:
Olaoluwa Osuntokun authored and GitHub committed 2024-08-07 17:54:31 -07:00
commit 459ee9b245
19 files changed
+2533 -1901

No files matched your search

+16 -1
View File
@@ -3158,7 +3158,7 @@ func TestFindBlindedPathsWithMC(t *testing.T) {
}
for i, path := range expectedPaths {
require.Equal(t, expectedPaths[i], path)
require.Equal(t, path, actualPaths[i])
}
}
@@ -3244,4 +3244,19 @@ func TestFindBlindedPathsWithMC(t *testing.T) {
"alice,bob,dave",
"alice,frank,dave",
})
// Test that if the user explicitly indicates that we should ignore
// the Frank node during path selection, then this is done.
routes, err = ctx.router.FindBlindedPaths(
dave, 1000, probabilitySrc, &BlindedPathRestrictions{
MinDistanceFromIntroNode: 2,
NumHops: 2,
MaxNumPaths: 3,
NodeOmissionSet: fn.NewSet(frank),
},
)
require.NoError(t, err)
assertPaths(routes, []string{
"alice,bob,dave",
})
}