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

+3 -1
View File
@@ -573,7 +573,9 @@ func (b *Builder) pruneZombieChans() error {
// both edges. If they're both disabled, then we can interpret this as
// the channel being closed and can prune it from our graph.
if b.cfg.AssumeChannelValid {
disabledChanIDs, err := b.cfg.Graph.DisabledChannelIDs()
disabledChanIDs, err := b.cfg.Graph.DisabledChannelIDs(
lnwire.GossipVersion1,
)
if err != nil {
return fmt.Errorf("unable to get disabled channels "+
"ids chans: %v", err)