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
2024-11-08 15:49:45 +02:00
parent b08bc99945
commit 9068ffcd8b
3 changed files with 19 additions and 9 deletions

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)
}