@@ -1653,14 +1653,14 @@ func TestBuildRoute(t *testing.T) {
16531653 // Test that we can't build a route when no hops are given.
16541654 hops = []route.Vertex {}
16551655 _ , err = ctx .router .BuildRoute (
1656- noAmt , hops , nil , 40 , nil , fn .None [[]byte ](),
1656+ noAmt , hops , nil , 40 , fn . None [[ 32 ] byte ]() , fn .None [[]byte ](),
16571657 )
16581658 require .Error (t , err )
16591659
16601660 // Create hop list for an unknown destination.
16611661 hops := []route.Vertex {ctx .aliases ["b" ], ctx .aliases ["y" ]}
16621662 _ , err = ctx .router .BuildRoute (
1663- noAmt , hops , nil , 40 , & payAddr , fn .None [[]byte ](),
1663+ noAmt , hops , nil , 40 , fn . Some ( payAddr ) , fn .None [[]byte ](),
16641664 )
16651665 noChanErr := ErrNoChannel {}
16661666 require .ErrorAs (t , err , & noChanErr )
@@ -1672,7 +1672,8 @@ func TestBuildRoute(t *testing.T) {
16721672
16731673 // Build the route for the given amount.
16741674 rt , err := ctx .router .BuildRoute (
1675- fn .Some (amt ), hops , nil , 40 , & payAddr , fn .None [[]byte ](),
1675+ fn .Some (amt ), hops , nil , 40 , fn .Some (payAddr ),
1676+ fn .None [[]byte ](),
16761677 )
16771678 require .NoError (t , err )
16781679
@@ -1684,7 +1685,7 @@ func TestBuildRoute(t *testing.T) {
16841685
16851686 // Build the route for the minimum amount.
16861687 rt , err = ctx .router .BuildRoute (
1687- noAmt , hops , nil , 40 , & payAddr , fn .None [[]byte ](),
1688+ noAmt , hops , nil , 40 , fn . Some ( payAddr ) , fn .None [[]byte ](),
16881689 )
16891690 require .NoError (t , err )
16901691
@@ -1702,7 +1703,7 @@ func TestBuildRoute(t *testing.T) {
17021703 // There is no amount that can pass through both channel 5 and 4.
17031704 hops = []route.Vertex {ctx .aliases ["e" ], ctx .aliases ["c" ]}
17041705 _ , err = ctx .router .BuildRoute (
1705- noAmt , hops , nil , 40 , nil , fn .None [[]byte ](),
1706+ noAmt , hops , nil , 40 , fn . None [[ 32 ] byte ]() , fn .None [[]byte ](),
17061707 )
17071708 require .Error (t , err )
17081709 noChanErr = ErrNoChannel {}
@@ -1722,7 +1723,7 @@ func TestBuildRoute(t *testing.T) {
17221723 // policy of channel 3.
17231724 hops = []route.Vertex {ctx .aliases ["b" ], ctx .aliases ["z" ]}
17241725 rt , err = ctx .router .BuildRoute (
1725- noAmt , hops , nil , 40 , & payAddr , fn .None [[]byte ](),
1726+ noAmt , hops , nil , 40 , fn . Some ( payAddr ) , fn .None [[]byte ](),
17261727 )
17271728 require .NoError (t , err )
17281729 checkHops (rt , []uint64 {1 , 8 }, payAddr )
@@ -1736,7 +1737,8 @@ func TestBuildRoute(t *testing.T) {
17361737 hops = []route.Vertex {ctx .aliases ["d" ], ctx .aliases ["f" ]}
17371738 amt = lnwire .NewMSatFromSatoshis (100 )
17381739 rt , err = ctx .router .BuildRoute (
1739- fn .Some (amt ), hops , nil , 40 , & payAddr , fn .None [[]byte ](),
1740+ fn .Some (amt ), hops , nil , 40 , fn .Some (payAddr ),
1741+ fn .None [[]byte ](),
17401742 )
17411743 require .NoError (t , err )
17421744 checkHops (rt , []uint64 {9 , 10 }, payAddr )
@@ -1752,7 +1754,7 @@ func TestBuildRoute(t *testing.T) {
17521754 // is a third pass through newRoute in which this gets corrected to end
17531755 hops = []route.Vertex {ctx .aliases ["d" ], ctx .aliases ["f" ]}
17541756 rt , err = ctx .router .BuildRoute (
1755- noAmt , hops , nil , 40 , & payAddr , fn .None [[]byte ](),
1757+ noAmt , hops , nil , 40 , fn . Some ( payAddr ) , fn .None [[]byte ](),
17561758 )
17571759 require .NoError (t , err )
17581760 checkHops (rt , []uint64 {9 , 10 }, payAddr )
0 commit comments