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

+20 -1
View File
@@ -3705,7 +3705,26 @@ func TestFindBlindedPaths(t *testing.T) {
"charlie,eve,bob,dave",
})
// 4) Finally, we will test the special case where the destination node
// 4) Repeat the above test but instruct the function to never use
// charlie.
paths, err = ctx.findBlindedPaths(&blindedPathRestrictions{
minNumHops: 2,
maxNumHops: 3,
nodeOmissionSet: fn.NewSet[route.Vertex](
ctx.keyFromAlias("charlie"),
),
})
require.NoError(t, err)
// We expect the following paths:
// - F, B, D
// - E, B, D
assertPaths(paths, []string{
"frank,bob,dave",
"eve,bob,dave",
})
// 5) Finally, we will test the special case where the destination node
// is also the recipient.
paths, err = ctx.findBlindedPaths(&blindedPathRestrictions{
minNumHops: 0,