@@ -490,16 +490,14 @@ func (c *ChannelGraph) ForEachChannel(cb func(*models.ChannelEdgeInfo,
490
490
}, func () {})
491
491
}
492
492
493
- // ForEachNodeDirectedChannelTx iterates through all channels of a given node,
493
+ // forEachNodeDirectedChannel iterates through all channels of a given node,
494
494
// executing the passed callback on the directed edge representing the channel
495
495
// and its incoming policy. If the callback returns an error, then the iteration
496
496
// is halted with the error propagated back up to the caller. An optional read
497
497
// transaction may be provided. If none is provided, a new one will be created.
498
498
//
499
499
// Unknown policies are passed into the callback as nil values.
500
- //
501
- // NOTE: this is part of the graphsession.graph interface.
502
- func (c * ChannelGraph ) ForEachNodeDirectedChannelTx (tx kvdb.RTx ,
500
+ func (c * ChannelGraph ) forEachNodeDirectedChannel (tx kvdb.RTx ,
503
501
node route.Vertex , cb func (channel * DirectedChannel ) error ) error {
504
502
505
503
if c .graphCache != nil {
@@ -510,7 +508,7 @@ func (c *ChannelGraph) ForEachNodeDirectedChannelTx(tx kvdb.RTx,
510
508
toNodeCallback := func () route.Vertex {
511
509
return node
512
510
}
513
- toNodeFeatures , err := c .FetchNodeFeaturesTx (tx , node )
511
+ toNodeFeatures , err := c .fetchNodeFeatures (tx , node )
514
512
if err != nil {
515
513
return err
516
514
}
@@ -554,12 +552,10 @@ func (c *ChannelGraph) ForEachNodeDirectedChannelTx(tx kvdb.RTx,
554
552
return nodeTraversal (tx , node [:], c .db , dbCallback )
555
553
}
556
554
557
- // FetchNodeFeaturesTx returns the features of a given node. If no features are
555
+ // fetchNodeFeatures returns the features of a given node. If no features are
558
556
// known for the node, an empty feature vector is returned. An optional read
559
557
// transaction may be provided. If none is provided, a new one will be created.
560
- //
561
- // NOTE: this is part of the graphsession.graph interface.
562
- func (c * ChannelGraph ) FetchNodeFeaturesTx (tx kvdb.RTx ,
558
+ func (c * ChannelGraph ) fetchNodeFeatures (tx kvdb.RTx ,
563
559
node route.Vertex ) (* lnwire.FeatureVector , error ) {
564
560
565
561
if c .graphCache != nil {
@@ -597,7 +593,7 @@ func (c *ChannelGraph) FetchNodeFeaturesTx(tx kvdb.RTx,
597
593
func (c * ChannelGraph ) ForEachNodeDirectedChannel (nodePub route.Vertex ,
598
594
cb func (channel * DirectedChannel ) error ) error {
599
595
600
- return c .ForEachNodeDirectedChannelTx (nil , nodePub , cb )
596
+ return c .forEachNodeDirectedChannel (nil , nodePub , cb )
601
597
}
602
598
603
599
// FetchNodeFeatures returns the features of the given node. If no features are
@@ -609,7 +605,7 @@ func (c *ChannelGraph) ForEachNodeDirectedChannel(nodePub route.Vertex,
609
605
func (c * ChannelGraph ) FetchNodeFeatures (nodePub route.Vertex ) (
610
606
* lnwire.FeatureVector , error ) {
611
607
612
- return c .FetchNodeFeaturesTx (nil , nodePub )
608
+ return c .fetchNodeFeatures (nil , nodePub )
613
609
}
614
610
615
611
// ForEachNodeCached is similar to forEachNode, but it utilizes the channel
@@ -641,7 +637,7 @@ func (c *ChannelGraph) ForEachNodeCached(cb func(node route.Vertex,
641
637
toNodeCallback := func () route.Vertex {
642
638
return node .PubKeyBytes
643
639
}
644
- toNodeFeatures , err := c .FetchNodeFeaturesTx (
640
+ toNodeFeatures , err := c .fetchNodeFeatures (
645
641
tx , node .PubKeyBytes ,
646
642
)
647
643
if err != nil {
@@ -3942,7 +3938,7 @@ type nodeTraverserSession struct {
3942
3938
func (c * nodeTraverserSession ) ForEachNodeDirectedChannel (nodePub route.Vertex ,
3943
3939
cb func (channel * DirectedChannel ) error ) error {
3944
3940
3945
- return c .db .ForEachNodeDirectedChannelTx (c .tx , nodePub , cb )
3941
+ return c .db .forEachNodeDirectedChannel (c .tx , nodePub , cb )
3946
3942
}
3947
3943
3948
3944
// FetchNodeFeatures returns the features of the given node. If the node is
@@ -3952,7 +3948,7 @@ func (c *nodeTraverserSession) ForEachNodeDirectedChannel(nodePub route.Vertex,
3952
3948
func (c * nodeTraverserSession ) FetchNodeFeatures (nodePub route.Vertex ) (
3953
3949
* lnwire.FeatureVector , error ) {
3954
3950
3955
- return c .db .FetchNodeFeaturesTx (c .tx , nodePub )
3951
+ return c .db .fetchNodeFeatures (c .tx , nodePub )
3956
3952
}
3957
3953
3958
3954
func putLightningNode (nodeBucket kvdb.RwBucket , aliasBucket kvdb.RwBucket , // nolint:dupl
0 commit comments