mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-11-18 01:56:55 +01:00
invoicesrpc: remove invoicerpc server's access to ChannelGraph pointer
Define a new GraphSource interface required by the invoicerpc server and remove its access to the graphdb.ChannelGraph pointer. Add the new invoicesrpc.GraphSource interface to the GraphSource interface and let DBSource implement it.
This commit is contained in:
@@ -796,7 +796,8 @@ func (r *rpcServer) addDeps(s *server, macService *macaroons.Service,
|
||||
err = subServerCgs.PopulateDependencies(
|
||||
r.cfg, s.cc, r.cfg.networkDir, macService, atpl, invoiceRegistry,
|
||||
s.htlcSwitch, r.cfg.ActiveNetParams.Params, s.chanRouter,
|
||||
routerBackend, s.nodeSigner, s.graphDB, s.chanStateDB,
|
||||
routerBackend, s.nodeSigner, s.graphDB, s.graphSource,
|
||||
s.chanStateDB,
|
||||
s.sweeper, tower, s.towerClientMgr, r.cfg.net.ResolveTCPAddr,
|
||||
genInvoiceFeatures, genAmpInvoiceFeatures,
|
||||
s.getNodeAnnouncement, s.updateAndBroadcastSelfNode, parseAddr,
|
||||
@@ -6096,7 +6097,7 @@ func (r *rpcServer) AddInvoice(ctx context.Context,
|
||||
NodeSigner: r.server.nodeSigner,
|
||||
DefaultCLTVExpiry: defaultDelta,
|
||||
ChanDB: r.server.chanStateDB,
|
||||
Graph: r.server.graphDB,
|
||||
Graph: r.server.graphSource,
|
||||
GenInvoiceFeatures: func() *lnwire.FeatureVector {
|
||||
v := r.server.featureMgr.Get(feature.SetInvoice)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user