channeldb+routing: remove tx arg for ForEachNode
This commit is contained in:
5 files changed
+8
-21
No files matched your search
+2
-2
@@ -4594,7 +4594,7 @@ 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(nil, func(_ kvdb.ReadTx, node *channeldb.LightningNode) error {
|
||||
err := graph.ForEachNode(func(_ kvdb.ReadTx, node *channeldb.LightningNode) error {
|
||||
nodeAddrs := make([]*lnrpc.NodeAddress, 0)
|
||||
for _, addr := range node.Addresses {
|
||||
nodeAddr := &lnrpc.NodeAddress{
|
||||
@@ -4909,7 +4909,7 @@ func (r *rpcServer) GetNetworkInfo(ctx context.Context,
|
||||
// network, tallying up the total number of nodes, and also gathering
|
||||
// each node so we can measure the graph diameter and degree stats
|
||||
// below.
|
||||
if err := graph.ForEachNode(nil, func(tx kvdb.ReadTx, node *channeldb.LightningNode) error {
|
||||
if err := graph.ForEachNode(func(tx kvdb.ReadTx, node *channeldb.LightningNode) error {
|
||||
// Increment the total number of nodes with each iteration.
|
||||
numNodes++
|
||||
|
||||
|
||||
Reference in new issue
Block a user