mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-09-06 17:47:01 +02:00
autopilot: add ForEachNodesChannels method to ChannelGraph interface
This is in preparation for removing the ForEachChannel method from the Node interface.
This commit is contained in:
@@ -87,6 +87,14 @@ type ChannelGraph interface {
|
||||
// callback returns an error, then execution should be terminated.
|
||||
ForEachNode(context.Context, func(context.Context, Node) error,
|
||||
func()) error
|
||||
|
||||
// ForEachNodesChannels iterates through all connected nodes, and for
|
||||
// each node, all the channels that connect to it. The passed callback
|
||||
// will be called with the context, the Node itself, and a slice of
|
||||
// ChannelEdge that connect to the node.
|
||||
ForEachNodesChannels(ctx context.Context,
|
||||
cb func(context.Context, Node, []*ChannelEdge) error,
|
||||
reset func()) error
|
||||
}
|
||||
|
||||
// NodeScore is a tuple mapping a NodeID to a score indicating the preference
|
||||
|
Reference in New Issue
Block a user