mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-11-10 14:17:56 +01:00
graph/db: let ForEachNodeCached maybe fetch node addresses
Here we adjust the ForEachNodeCached graph DB method to pass in a node's addresses into the provided call-back if requested. This will allow us to improve the performance of node/channel iteration in the autopilot subserver.
This commit is contained in:
@@ -235,7 +235,9 @@ type GraphSource interface {
|
||||
// channel graph cache if one is available. It is less consistent than
|
||||
// ForEachNode since any further calls are made across multiple
|
||||
// transactions.
|
||||
ForEachNodeCached(ctx context.Context, cb func(node route.Vertex,
|
||||
chans map[uint64]*graphdb.DirectedChannel) error,
|
||||
ForEachNodeCached(ctx context.Context, withAddrs bool,
|
||||
cb func(ctx context.Context, node route.Vertex,
|
||||
addrs []net.Addr,
|
||||
chans map[uint64]*graphdb.DirectedChannel) error,
|
||||
reset func()) error
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user