multi: remove the need for NewRoutingGraph

The `graphsession.NewRoutingGraph` method was used to create a
RoutingGraph instance with no consistent read transaction across calls.
But now that the ChannelGraph directly implements this, we can remove
The NewRoutingGraph method.
This commit is contained in:
Elle Mouton committed 2025-02-18 07:59:57 -03:00
1 parent 5d5cfe36c7
commit 8ec08fbfa4
4 files changed
+27 -13

No files matched your search

+2 -3
View File
@@ -51,7 +51,6 @@ import (
"github.com/lightningnetwork/lnd/graph"
graphdb "github.com/lightningnetwork/lnd/graph/db"
"github.com/lightningnetwork/lnd/graph/db/models"
"github.com/lightningnetwork/lnd/graph/graphsession"
"github.com/lightningnetwork/lnd/htlcswitch"
"github.com/lightningnetwork/lnd/htlcswitch/hop"
"github.com/lightningnetwork/lnd/input"
@@ -711,8 +710,8 @@ func (r *rpcServer) addDeps(s *server, macService *macaroons.Service,
amount lnwire.MilliSatoshi) (btcutil.Amount, error) {
return routing.FetchAmountPairCapacity(
graphsession.NewRoutingGraph(graph),
selfNode.PubKeyBytes, nodeFrom, nodeTo, amount,
graph, selfNode.PubKeyBytes, nodeFrom, nodeTo,
amount,
)
},
FetchChannelEndpoints: func(chanID uint64) (route.Vertex,