graph+autopilot: let autopilot use new graph ForEachNode method

Which passes a NodeRTx to the call-back instead of a `kvdb.RTx`.
This commit is contained in:
Elle Mouton committed 2025-02-10 09:46:15 +02:00
1 parent 14cedef58e
commit 9b86ee53db
6 files changed
+95 -66

No files matched your search

+2 -4
View File
@@ -6533,10 +6533,8 @@ func (r *rpcServer) DescribeGraph(ctx context.Context,
// First iterate through all the known nodes (connected or unconnected
// within the graph), collating their current state into the RPC
// response.
err := graph.ForEachNode(func(_ kvdb.RTx,
node *models.LightningNode) error {
lnNode := marshalNode(node)
err := graph.ForEachNode(func(nodeTx graphdb.NodeRTx) error {
lnNode := marshalNode(nodeTx.Node())
resp.Nodes = append(resp.Nodes, lnNode)