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:
4 files changed
+27
-13
No files matched your search
+2
-3
@@ -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,
|
||||
|
||||
Reference in new issue
Block a user