routerrpc: add HasNode backend function for LSP heuristic
This commit adds the HasNode function to the RouterBackend struct, which checks if a node exists in the graph (i.e., has public channels). This function is needed by the LSP detection heuristic to determine if a node is publicly reachable. The function is wired up in rpcserver.go to query the graph database.
This commit is contained in:
2 files changed
+12
No files matched your search
@@ -64,6 +64,11 @@ type RouterBackend struct {
|
||||
FetchChannelEndpoints func(chanID uint64) (route.Vertex,
|
||||
route.Vertex, error)
|
||||
|
||||
// HasNode returns true if the node exists in the graph (i.e., has
|
||||
// public channels), false otherwise. This means the node is a public
|
||||
// node and should be reachable.
|
||||
HasNode func(nodePub route.Vertex) (bool, error)
|
||||
|
||||
// FindRoute is a closure that abstracts away how we locate/query for
|
||||
// routes.
|
||||
FindRoute func(*routing.RouteRequest) (*route.Route, float64, error)
|
||||
|
||||
Reference in new issue
Block a user