routing/router: extend ChannelGraphSource interface with IsPublicNode
method
This commit is contained in:
parent
e795f7fce4
commit
18ecb31983
@ -72,6 +72,10 @@ type ChannelGraphSource interface {
|
||||
// the target node.
|
||||
IsStaleNode(node Vertex, timestamp time.Time) bool
|
||||
|
||||
// IsPublicNode determines whether the given vertex is seen as a public
|
||||
// node in the graph from the graph's source node's point of view.
|
||||
IsPublicNode(node Vertex) (bool, error)
|
||||
|
||||
// IsKnownEdge returns true if the graph source already knows of the
|
||||
// passed channel ID.
|
||||
IsKnownEdge(chanID lnwire.ShortChannelID) bool
|
||||
@ -2222,6 +2226,14 @@ func (r *ChannelRouter) IsStaleNode(node Vertex, timestamp time.Time) bool {
|
||||
return r.assertNodeAnnFreshness(node, timestamp) != nil
|
||||
}
|
||||
|
||||
// IsPublicNode determines whether the given vertex is seen as a public node in
|
||||
// the graph from the graph's source node's point of view.
|
||||
//
|
||||
// NOTE: This method is part of the ChannelGraphSource interface.
|
||||
func (r *ChannelRouter) IsPublicNode(node Vertex) (bool, error) {
|
||||
return r.cfg.Graph.IsPublicNode(node)
|
||||
}
|
||||
|
||||
// IsKnownEdge returns true if the graph source already knows of the passed
|
||||
// channel ID.
|
||||
//
|
||||
|
Loading…
Reference in New Issue
Block a user