graph/db: version fetch chan infos
Add a gossip version parameter to FetchChanInfos in the Store interface and both KV/SQL implementations. Update the graph builder caller and refactor related tests.
This commit is contained in:
6 files changed
+56
-35
No files matched your search
@@ -2960,7 +2960,13 @@ func (c *KVStore) FilterChannelRange(startHeight,
|
||||
// skipped and the result will contain only those edges that exist at the time
|
||||
// of the query. This can be used to respond to peer queries that are seeking to
|
||||
// fill in gaps in their view of the channel graph.
|
||||
func (c *KVStore) FetchChanInfos(chanIDs []uint64) ([]ChannelEdge, error) {
|
||||
func (c *KVStore) FetchChanInfos(v lnwire.GossipVersion,
|
||||
chanIDs []uint64) ([]ChannelEdge, error) {
|
||||
|
||||
if v != lnwire.GossipVersion1 {
|
||||
return nil, ErrVersionNotSupportedForKVDB
|
||||
}
|
||||
|
||||
return c.fetchChanInfos(nil, chanIDs)
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user