graph/db: add version parameter to FetchChannelEdgesByID/Outpoint

Make channel edge fetching version-aware by adding gossip version
parameter to FetchChannelEdgesByID and FetchChannelEdgesByOutpoint.
Add corresponding methods to VersionedGraph. V2 policy building is
marked as TODO.
This commit is contained in:
Elle Mouton committed 2026-02-13 07:21:23 +02:00
1 parent 971c0f6eb8
commit d88fa01162
4 files changed
+73 -15

No files matched your search

+2 -2
View File
@@ -276,7 +276,7 @@ type Store interface { //nolint:interfacebloat
// houses the general information for the channel itself is returned as
// well as two structs that contain the routing policies for the channel
// in either direction.
FetchChannelEdgesByOutpoint(op *wire.OutPoint) (
FetchChannelEdgesByOutpoint(v lnwire.GossipVersion, op *wire.OutPoint) (
*models.ChannelEdgeInfo, *models.ChannelEdgePolicy,
*models.ChannelEdgePolicy, error)
@@ -291,7 +291,7 @@ type Store interface { //nolint:interfacebloat
// zombie within the database. In this case, the ChannelEdgePolicy's
// will be nil, and the ChannelEdgeInfo will only include the public
// keys of each node.
FetchChannelEdgesByID(chanID uint64) (
FetchChannelEdgesByID(v lnwire.GossipVersion, chanID uint64) (
*models.ChannelEdgeInfo, *models.ChannelEdgePolicy,
*models.ChannelEdgePolicy, error)