graph/db: version ForEachSourceNodeChannel

Add a gossip version parameter to ForEachSourceNodeChannel in the Store
interface and both KV/SQL implementations. The VersionedGraph wrapper
delegates with its baked-in version. Convert the
testAddChannelEdgeShellNodes and testForEachSourceNodeChannel tests to
run against both v1 and v2 gossip versions.
This commit is contained in:
Elle Mouton committed 2026-02-20 08:46:58 +02:00
1 parent 2aaa52adf9
commit 3ea2423f25
6 files changed
+85 -59

No files matched your search

+1 -1
View File
@@ -59,7 +59,7 @@ type Store interface { //nolint:interfacebloat
// node, executing the passed callback on each. The call-back is
// provided with the channel's outpoint, whether we have a policy for
// the channel and the channel peer's node information.
ForEachSourceNodeChannel(ctx context.Context,
ForEachSourceNodeChannel(ctx context.Context, v lnwire.GossipVersion,
cb func(chanPoint wire.OutPoint, havePolicy bool,
otherNode *models.Node) error,
reset func()) error