@@ -658,7 +658,7 @@ func (c *KVStore) ForEachNodeCached(cb func(node route.Vertex,
658
658
// We'll iterate over each node, then the set of channels for each
659
659
// node, and construct a similar callback functiopn signature as the
660
660
// main funcotin expects.
661
- return c . forEachNode (func (tx kvdb.RTx ,
661
+ return forEachNode (c . db , func (tx kvdb.RTx ,
662
662
node * models.LightningNode ) error {
663
663
664
664
channels := make (map [uint64 ]* DirectedChannel )
@@ -774,7 +774,7 @@ func (c *KVStore) DisabledChannelIDs() ([]uint64, error) {
774
774
// executed under the same read transaction and so, methods on the NodeTx object
775
775
// _MUST_ only be called from within the call-back.
776
776
func (c * KVStore ) ForEachNode (cb func (tx NodeRTx ) error ) error {
777
- return c . forEachNode (func (tx kvdb.RTx ,
777
+ return forEachNode (c . db , func (tx kvdb.RTx ,
778
778
node * models.LightningNode ) error {
779
779
780
780
return cb (newChanGraphNodeTx (tx , c , node ))
@@ -788,7 +788,7 @@ func (c *KVStore) ForEachNode(cb func(tx NodeRTx) error) error {
788
788
//
789
789
// TODO(roasbeef): add iterator interface to allow for memory efficient graph
790
790
// traversal when graph gets mega.
791
- func ( c * KVStore ) forEachNode (
791
+ func forEachNode (db kvdb. Backend ,
792
792
cb func (kvdb.RTx , * models.LightningNode ) error ) error {
793
793
794
794
traversal := func (tx kvdb.RTx ) error {
@@ -819,7 +819,7 @@ func (c *KVStore) forEachNode(
819
819
})
820
820
}
821
821
822
- return kvdb .View (c . db , traversal , func () {})
822
+ return kvdb .View (db , traversal , func () {})
823
823
}
824
824
825
825
// ForEachNodeCacheable iterates through all the stored vertices/nodes in the
0 commit comments