mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-07-02 03:22:25 +02:00
graph: remove unused ForEachNode method from Builder
And from various interfaces where it is not needed.
This commit is contained in:
@ -1555,18 +1555,6 @@ func (b *Builder) FetchLightningNode(
|
|||||||
return b.cfg.Graph.FetchLightningNode(node)
|
return b.cfg.Graph.FetchLightningNode(node)
|
||||||
}
|
}
|
||||||
|
|
||||||
// ForEachNode is used to iterate over every node in router topology.
|
|
||||||
//
|
|
||||||
// NOTE: This method is part of the ChannelGraphSource interface.
|
|
||||||
func (b *Builder) ForEachNode(
|
|
||||||
cb func(*models.LightningNode) error) error {
|
|
||||||
|
|
||||||
return b.cfg.Graph.ForEachNode(
|
|
||||||
func(_ kvdb.RTx, n *models.LightningNode) error {
|
|
||||||
return cb(n)
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// ForAllOutgoingChannels is used to iterate over all outgoing channels owned by
|
// ForAllOutgoingChannels is used to iterate over all outgoing channels owned by
|
||||||
// the router.
|
// the router.
|
||||||
//
|
//
|
||||||
|
@ -85,9 +85,6 @@ type ChannelGraphSource interface {
|
|||||||
// public key. channeldb.ErrGraphNodeNotFound is returned if the node
|
// public key. channeldb.ErrGraphNodeNotFound is returned if the node
|
||||||
// doesn't exist within the graph.
|
// doesn't exist within the graph.
|
||||||
FetchLightningNode(route.Vertex) (*models.LightningNode, error)
|
FetchLightningNode(route.Vertex) (*models.LightningNode, error)
|
||||||
|
|
||||||
// ForEachNode is used to iterate over every node in the known graph.
|
|
||||||
ForEachNode(func(node *models.LightningNode) error) error
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// DB is an interface describing a persisted Lightning Network graph.
|
// DB is an interface describing a persisted Lightning Network graph.
|
||||||
@ -241,12 +238,6 @@ type DB interface {
|
|||||||
FetchLightningNode(nodePub route.Vertex) (*models.LightningNode,
|
FetchLightningNode(nodePub route.Vertex) (*models.LightningNode,
|
||||||
error)
|
error)
|
||||||
|
|
||||||
// ForEachNode iterates through all the stored vertices/nodes in the
|
|
||||||
// graph, executing the passed callback with each node encountered. If
|
|
||||||
// the callback returns an error, then the transaction is aborted and
|
|
||||||
// the iteration stops early.
|
|
||||||
ForEachNode(cb func(kvdb.RTx, *models.LightningNode) error) error
|
|
||||||
|
|
||||||
// ForEachNodeChannel iterates through all channels of the given node,
|
// ForEachNodeChannel iterates through all channels of the given node,
|
||||||
// executing the passed callback with an edge info structure and the
|
// executing the passed callback with an edge info structure and the
|
||||||
// policies of each end of the channel. The first edge policy is the
|
// policies of each end of the channel. The first edge policy is the
|
||||||
|
Reference in New Issue
Block a user