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 committed 2025-08-06 09:52:09 +02:00
1 parent ce7fe84da7
commit 699e335954
5 files changed
+82 -168

No files matched your search

-7
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