mirror of
https://github.com/lightningnetwork/lnd.git
synced 2026-08-13 12:32:48 +02:00
Add a gossip version parameter to FilterChannelRange in the Store interface, both KV and SQL implementations, and the ChannelGraph wrapper. KVStore guards against non-v1 versions with ErrVersionNotSupportedForKVDB. SQLStore accepts any known gossip version, filtering the channel results by version and using it in policy lookups. The SQL query still uses GetPublicV1ChannelsBySCID for now (a TODO marks where a version-aware query will be substituted in a follow-up). VersionedGraph.FilterChannelRange shadows the ChannelGraph method with a version-free signature, passing its baked-in version to the store. This keeps the ChannelGraphTimeSeries interface and ChanSeries implementation unchanged. Add TestFilterChannelRangeVersionGuard to verify that the KV store returns ErrVersionNotSupportedForKVDB for v2 requests while the SQL store handles them gracefully. |
||
|---|---|---|
| .. | ||
| db | ||
| testdata | ||
| builder.go | ||
| builder_test.go | ||
| errors.go | ||
| interfaces.go | ||
| log.go | ||
| notifications_test.go | ||
| setup_test.go | ||
| stats.go | ||