graph: let FetchNodeFeatures take an optional read tx

For consistency in the graphsessoin.graph interface, we let the
FetchNodeFeatures method take a read transaction just like the
ForEachNodeDirectedChannel. This is nice because then all calls in the
same pathfinding transaction use the same read transaction.
This commit is contained in:
Elle Mouton committed 2025-02-18 07:59:57 -03:00
1 parent b08bc99945
commit 9068ffcd8b
3 files changed
+19 -9

No files matched your search

+1 -1
View File
@@ -400,5 +400,5 @@ func (g *mockGraphSessionChanDB) ForEachNodeChannel(nodePub route.Vertex,
func (g *mockGraphSessionChanDB) FetchNodeFeatures(nodePub route.Vertex) (
*lnwire.FeatureVector, error) {
return g.graph.FetchNodeFeatures(nodePub)
return g.graph.FetchNodeFeatures(g.tx, nodePub)
}