multi: remove kvdb.RTx from ForEachNodeChannel

Since we have not removed all call-sites that make use of this
parameter, we can remove it. This helps hide DB-specific details from
the interface we will introduce for the graph store.
This commit is contained in:
Elle Mouton
2025-03-26 17:28:10 +02:00
committed by ziggie
parent de11997fad
commit 2f99706fa1
7 changed files with 18 additions and 20 deletions

View File

@@ -56,7 +56,6 @@ import (
"github.com/lightningnetwork/lnd/input"
"github.com/lightningnetwork/lnd/invoices"
"github.com/lightningnetwork/lnd/keychain"
"github.com/lightningnetwork/lnd/kvdb"
"github.com/lightningnetwork/lnd/labels"
"github.com/lightningnetwork/lnd/lncfg"
"github.com/lightningnetwork/lnd/lnrpc"
@@ -6959,7 +6958,7 @@ func (r *rpcServer) GetNodeInfo(ctx context.Context,
)
err = graph.ForEachNodeChannel(node.PubKeyBytes,
func(_ kvdb.RTx, edge *models.ChannelEdgeInfo,
func(edge *models.ChannelEdgeInfo,
c1, c2 *models.ChannelEdgePolicy) error {
numChannels++
@@ -7641,7 +7640,7 @@ func (r *rpcServer) FeeReport(ctx context.Context,
var feeReports []*lnrpc.ChannelFeeReport
err = channelGraph.ForEachNodeChannel(selfNode.PubKeyBytes,
func(_ kvdb.RTx, chanInfo *models.ChannelEdgeInfo,
func(chanInfo *models.ChannelEdgeInfo,
edgePolicy, _ *models.ChannelEdgePolicy) error {
// Self node should always have policies for its