mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-12-09 20:33:45 +01:00
routing: add source parameter to query routes
This commit allows execution of QueryRoutes from any source node. Previously this was restricted to only the self node.
This commit is contained in:
@@ -1712,7 +1712,7 @@ func TestPathFindSpecExample(t *testing.T) {
|
||||
carol := ctx.aliases["C"]
|
||||
const amt lnwire.MilliSatoshi = 4999999
|
||||
routes, err := ctx.router.FindRoutes(
|
||||
carol, amt, noRestrictions, 100,
|
||||
bobNode.PubKeyBytes, carol, amt, noRestrictions, 100,
|
||||
)
|
||||
if err != nil {
|
||||
t.Fatalf("unable to find route: %v", err)
|
||||
@@ -1779,7 +1779,7 @@ func TestPathFindSpecExample(t *testing.T) {
|
||||
// We'll now request a route from A -> B -> C.
|
||||
ctx.router.routeCache = make(map[routeTuple][]*Route)
|
||||
routes, err = ctx.router.FindRoutes(
|
||||
carol, amt, noRestrictions, 100,
|
||||
source.PubKeyBytes, carol, amt, noRestrictions, 100,
|
||||
)
|
||||
if err != nil {
|
||||
t.Fatalf("unable to find routes: %v", err)
|
||||
|
||||
Reference in New Issue
Block a user