mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-08-30 07:35:07 +02:00
graph/db: define a NodeTraverser interface
Which describes methods that will use the graph cache if it is available for fast read-only calls.
This commit is contained in:
@@ -602,6 +602,8 @@ func (c *ChannelGraph) FetchNodeFeaturesTx(tx kvdb.RTx,
|
||||
// of the database.
|
||||
//
|
||||
// Unknown policies are passed into the callback as nil values.
|
||||
//
|
||||
// NOTE: this is part of the graphdb.NodeTraverser interface.
|
||||
func (c *ChannelGraph) ForEachNodeDirectedChannel(nodePub route.Vertex,
|
||||
cb func(channel *DirectedChannel) error) error {
|
||||
|
||||
@@ -612,6 +614,8 @@ func (c *ChannelGraph) ForEachNodeDirectedChannel(nodePub route.Vertex,
|
||||
// known for the node, an empty feature vector is returned.
|
||||
// If the graphCache is available, then it will be used to retrieve the node's
|
||||
// features instead of the database.
|
||||
//
|
||||
// NOTE: this is part of the graphdb.NodeTraverser interface.
|
||||
func (c *ChannelGraph) FetchNodeFeatures(nodePub route.Vertex) (
|
||||
*lnwire.FeatureVector, error) {
|
||||
|
||||
|
Reference in New Issue
Block a user