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:
Elle Mouton committed 2026-02-13 07:21:23 +02:00
1 parent a99604c7d7
commit 971c0f6eb8
6 files changed
+46 -24

No files matched your search

+1 -1
View File
@@ -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