autopilot: remove the ForEachChannel method from Node interface

And instead make use of the new ForEachNodesChannels method which
uses a much more efficient method for iterating through nodes&channels.
This commit is contained in:
Elle Mouton
2025-08-03 17:22:56 +02:00
parent ce7fe84da7
commit 699e335954
5 changed files with 82 additions and 168 deletions

View File

@@ -31,13 +31,6 @@ type Node interface {
// Addrs returns a slice of publicly reachable public TCP addresses
// that the peer is known to be listening on.
Addrs() []net.Addr
// ForEachChannel is a higher-order function that will be used to
// iterate through all edges emanating from/to the target node. For
// each active channel, this function should be called with the
// populated ChannelEdge that describes the active channel.
ForEachChannel(context.Context, func(context.Context,
ChannelEdge) error) error
}
// LocalChannel is a simple struct which contains relevant details of a