graph/db: version disabled channel IDs

Add a gossip version parameter to DisabledChannelIDs in the Store
interface and both implementations. Add a new version-filtered SQL
query and update the builder caller.
This commit is contained in:
Elle Mouton committed 2026-02-20 09:19:23 +02:00
1 parent 672b999d22
commit fc19a24d07
9 files changed
+113 -18

No files matched your search

+9 -2
View File
@@ -660,8 +660,10 @@ func (c *ChannelGraph) ForEachChannel(ctx context.Context,
}
// DisabledChannelIDs returns the channel ids of disabled channels.
func (c *ChannelGraph) DisabledChannelIDs() ([]uint64, error) {
return c.db.DisabledChannelIDs()
func (c *ChannelGraph) DisabledChannelIDs(v lnwire.GossipVersion) (
[]uint64, error) {
return c.db.DisabledChannelIDs(v)
}
// HasV1ChannelEdge returns true if the database knows of a channel edge.
@@ -943,6 +945,11 @@ func (c *VersionedGraph) ForEachChannelCacheable(
return c.db.ForEachChannelCacheable(c.v, cb, reset)
}
// DisabledChannelIDs returns the channel ids of disabled channels.
func (c *VersionedGraph) DisabledChannelIDs() ([]uint64, error) {
return c.db.DisabledChannelIDs(c.v)
}
// ChannelID attempts to lookup the 8-byte compact channel ID.
func (c *VersionedGraph) ChannelID(chanPoint *wire.OutPoint) (uint64, error) {
return c.db.ChannelID(c.v, chanPoint)