multi: add node omission list for blinded paths

This commit is contained in:
Elle Mouton committed 2024-08-07 17:03:11 +02:00
1 parent b490deefdf
commit e4619afc08
10 files changed
+1254 -1142

No files matched your search

+15
View File
@@ -3236,4 +3236,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",
})
}