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
2025-02-05 12:18:11 +02:00
parent 14cedef58e
commit 9b86ee53db
6 changed files with 95 additions and 66 deletions

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)