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:
9 files changed
+113
-18
No files matched your search
@@ -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{}
|
||||
|
||||
|
||||
Reference in new issue
Block a user