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
@@ -146,7 +146,7 @@ type Store interface { //nolint:interfacebloat
// IsPublicNode is a helper method that determines whether the node with
// the given public key is seen as a public node in the graph from the
// graph's source node's point of view.
IsPublicNode(pubKey [33]byte) (bool, error)
IsPublicNode(v lnwire.GossipVersion, pubKey [33]byte) (bool, error)
// GraphSession will provide the call-back with access to a
// NodeTraverser instance which can be used to perform queries against