graph/db: add version parameter to IsPublicNode
Make IsPublicNode version-aware by routing to the appropriate SQL query based on gossip version. V1 and v2 have different criteria for determining node publicity (v1 requires four signatures, v2 requires one). Convert TestNodeIsPublic to versioned test for both protocols.
This commit is contained in:
6 files changed
+46
-24
No files matched your search
+1
-1
@@ -1330,7 +1330,7 @@ func (b *Builder) IsStaleNode(ctx context.Context, node route.Vertex,
|
||||
//
|
||||
// NOTE: This method is part of the ChannelGraphSource interface.
|
||||
func (b *Builder) IsPublicNode(node route.Vertex) (bool, error) {
|
||||
return b.cfg.Graph.IsPublicNode(node)
|
||||
return b.v1Graph.IsPublicNode(node)
|
||||
}
|
||||
|
||||
// IsKnownEdge returns true if the graph source already knows of the passed
|
||||
|
||||
Reference in new issue
Block a user