Skip to content

Commit d5573f2

Browse files
committed
preliminary commit
1 parent 7e70e3d commit d5573f2

File tree

5 files changed

+705
-262
lines changed

5 files changed

+705
-262
lines changed

graph/db/kv_store.go

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3431,11 +3431,10 @@ func (c *KVStore) fetchLightningNode(tx kvdb.RTx,
34313431
return node, nil
34323432
}
34333433

3434-
// HasLightningNode determines if the graph has a vertex identified by the
3435-
// target node identity public key. If the node exists in the database, a
3436-
// timestamp of when the data for the node was lasted updated is returned along
3437-
// with a true boolean. Otherwise, an empty time.Time is returned with a false
3438-
// boolean.
3434+
// HasNode determines if the graph has a vertex identified by the target node
3435+
// identity public key. If the node exists in the database, a timestamp of when
3436+
// the data for the node was lasted updated is returned along with a true
3437+
// boolean. Otherwise, an empty time.Time is returned with a false boolean.
34393438
func (c *KVStore) HasNode(_ context.Context,
34403439
nodePub [33]byte) (time.Time, bool, error) {
34413440

lnrpc/routerrpc/router_backend.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,10 @@ type RouterBackend struct {
6464
FetchChannelEndpoints func(chanID uint64) (route.Vertex,
6565
route.Vertex, error)
6666

67+
// HasNode returns true if the node exists in the graph (i.e., has
68+
// public channels), false otherwise.
69+
HasNode func(nodePub route.Vertex) (bool, error)
70+
6771
// FindRoute is a closure that abstracts away how we locate/query for
6872
// routes.
6973
FindRoute func(*routing.RouteRequest) (*route.Route, float64, error)

0 commit comments

Comments
 (0)