mirror of
https://github.com/lightningnetwork/lnd.git
synced 2026-08-17 13:06:14 +02:00
Update ForEachNodeChannel to accept a gossip version parameter, allowing callers to specify which gossip version's channels should be iterated. This change mirrors the approach taken in ForEachChannel and prepares the graph database for supporting multiple gossip versions while maintaining backward compatibility. The Store interface is updated to include the version parameter, and both KVStore and SQLStore implementations are updated accordingly: - KVStore validates that only GossipVersion1 is requested, returning ErrVersionNotSupportedForKVDB for other versions. - SQLStore passes the version through to the underlying node query, enabling version-specific channel iteration. The ChannelGraph wrapper is updated to accept and pass through the version parameter. VersionedGraph gains a ForEachNodeChannel method that automatically uses its configured gossip version, providing a clean interface for version-specific operations. Update all call sites to explicitly pass lnwire.GossipVersion1, except for the local channel manager in server.go which now uses the v1Graph directly (matching the pattern used in other parts of the codebase). |
||
|---|---|---|
| .. | ||
| migration1 | ||
| models | ||
| addr.go | ||
| addr_test.go | ||
| benchmark_test.go | ||
| channel_cache.go | ||
| channel_cache_test.go | ||
| codec.go | ||
| errors.go | ||
| graph.go | ||
| graph_cache.go | ||
| graph_cache_test.go | ||
| graph_test.go | ||
| interfaces.go | ||
| kv_store.go | ||
| kv_store_features_test.go | ||
| log.go | ||
| notifications.go | ||
| options.go | ||
| reject_cache.go | ||
| reject_cache_test.go | ||
| setup_test.go | ||
| sql_store.go | ||
| test_kvdb.go | ||
| test_postgres.go | ||
| test_sqlite.go | ||