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

+7 -1
View File
@@ -772,7 +772,13 @@ func (c *KVStore) ForEachNodeCached(ctx context.Context, withAddrs bool,
// DisabledChannelIDs returns the channel ids of disabled channels.
// A channel is disabled when two of the associated ChanelEdgePolicies
// have their disabled bit on.
func (c *KVStore) DisabledChannelIDs() ([]uint64, error) {
func (c *KVStore) DisabledChannelIDs(
v lnwire.GossipVersion) ([]uint64, error) {
if v != lnwire.GossipVersion1 {
return nil, ErrVersionNotSupportedForKVDB
}
var disabledChanIDs []uint64
var chanEdgeFound map[uint64]struct{}