mirror of
https://github.com/lightningnetwork/lnd.git
synced 2026-08-14 12:42:48 +02:00
ForEachNodeCached is now only used for topology-oriented traversal, so the address-loading option forced one autopilot scoring path to bypass the in-memory graph cache for data it did not consume. Remove the withAddrs parameter and the associated SQL/KV address plumbing so cached node iteration can consistently use the graph cache when it is loaded. Autopilot still requires peer addresses before opening channels. That filtering remains in Agent.openChans via ForEachNode, where the selected candidates' addresses are collected for ConnectToPeer. The trade-off is that ForEachNodesChannels no longer excludes addressless nodes from graph-wide scoring inputs such as median channel size or centrality, which also feed lncli getnetworkinfo statistics like graph diameter. In practice the only addressless nodes our local view tends to know about are nodes with no public channels (e.g. our own node or peers we share only private channels with), so the impact on the reported stats should be negligible. Active channel candidates remain address-filtered before dialing. |
||
|---|---|---|
| .. | ||
| db | ||
| testdata | ||
| builder.go | ||
| builder_test.go | ||
| errors.go | ||
| interfaces.go | ||
| log.go | ||
| notifications_test.go | ||
| setup_test.go | ||
| stats.go | ||