@@ -3898,7 +3898,7 @@ func TestFindBlindedPaths(t *testing.T) {
3898
3898
"eve,bob,dave" ,
3899
3899
})
3900
3900
3901
- // 5) Finally, we will test the special case where the destination node
3901
+ // 5) We will also test the special case where the destination node
3902
3902
// is also the recipient.
3903
3903
paths , err = ctx .findBlindedPaths (& blindedPathRestrictions {
3904
3904
minNumHops : 0 ,
@@ -3910,31 +3910,11 @@ func TestFindBlindedPaths(t *testing.T) {
3910
3910
"dave" ,
3911
3911
})
3912
3912
3913
- // 6) Restrict the min & max path length such that we only include paths
3914
- // with one being only the intro-node and the others with one hop other
3915
- // than the destination hop.
3916
- paths , err = ctx .findBlindedPaths (& blindedPathRestrictions {
3917
- minNumHops : 0 ,
3918
- maxNumHops : 1 ,
3919
- })
3920
- require .NoError (t , err )
3921
-
3922
- // We expect the following paths:
3923
- // - D
3924
- // - B, D
3925
- // - C, D
3926
- // The (A, D) path is not chosen since A does not advertise the route
3927
- // blinding feature bit. The (G, D) path is not chosen since G does not
3928
- // have any other known channels.
3929
- assertPaths (paths , []string {
3930
- "dave" ,
3931
- "bob,dave" ,
3932
- "charlie,dave" ,
3933
- })
3934
-
3935
- // 7) Restrict the min & max path length such that we only include paths
3936
- // with one hop other than the destination hop. Now with bob-dave as the
3937
- // incoming channel.
3913
+ // 6) Now, we will test some cases where the user manually specifies
3914
+ // the first few incoming channels of a route.
3915
+ //
3916
+ // 6.1) Let the user specify the B-D channel as the last hop with a
3917
+ // max of 1 hop.
3938
3918
paths , err = ctx .findBlindedPaths (& blindedPathRestrictions {
3939
3919
minNumHops : 1 ,
3940
3920
maxNumHops : 1 ,
@@ -3944,13 +3924,13 @@ func TestFindBlindedPaths(t *testing.T) {
3944
3924
})
3945
3925
require .NoError (t , err )
3946
3926
3947
- // Expect only B->D path.
3927
+ // If the max number of hops is 1, then only the B->D path is chosen
3948
3928
assertPaths (paths , []string {
3949
3929
"bob,dave" ,
3950
3930
})
3951
3931
3952
- // 8 ) Extend the search to include 2 hops other than the destination,
3953
- // with bob-dave as the incoming channel .
3932
+ // 6.2 ) Extend the search to include 2 hops along with the B-D channel
3933
+ // restriction .
3954
3934
paths , err = ctx .findBlindedPaths (& blindedPathRestrictions {
3955
3935
minNumHops : 1 ,
3956
3936
maxNumHops : 2 ,
@@ -3968,7 +3948,7 @@ func TestFindBlindedPaths(t *testing.T) {
3968
3948
"eve,bob,dave" ,
3969
3949
})
3970
3950
3971
- // 9 ) Extend the search even further and also increase the minimum path
3951
+ // 6.3 ) Extend the search even further and also increase the minimum path
3972
3952
// length, but this time with charlie-dave as the incoming channel.
3973
3953
paths , err = ctx .findBlindedPaths (& blindedPathRestrictions {
3974
3954
minNumHops : 2 ,
@@ -3987,7 +3967,7 @@ func TestFindBlindedPaths(t *testing.T) {
3987
3967
"bob,eve,charlie,dave" ,
3988
3968
})
3989
3969
3990
- // 10 ) Repeat the above test but instruct the function to never use
3970
+ // 6.4 ) Repeat the above test but instruct the function to never use
3991
3971
// charlie.
3992
3972
_ , err = ctx .findBlindedPaths (& blindedPathRestrictions {
3993
3973
minNumHops : 2 ,
@@ -4000,7 +3980,7 @@ func TestFindBlindedPaths(t *testing.T) {
4000
3980
require .ErrorContains (t , err , "cannot simultaneously be included in " +
4001
3981
"the omission set and in the partially specified path" )
4002
3982
4003
- // 11 ) Assert that an error is returned if a user accidentally tries
3983
+ // 6.5 ) Assert that an error is returned if a user accidentally tries
4004
3984
// to force a circular path.
4005
3985
_ , err = ctx .findBlindedPaths (& blindedPathRestrictions {
4006
3986
minNumHops : 2 ,
0 commit comments