multi: add sub-server dep

This commit is contained in:
ErikEk committed 2022-04-30 08:55:49 +02:00
1 parent b2646edc52
commit 635cffa871
8 files changed
+22 -7

No files matched your search

+12
View File
@@ -17,6 +17,7 @@ import (
"github.com/lightningnetwork/lnd/lnrpc/chainrpc"
"github.com/lightningnetwork/lnd/lnrpc/devrpc"
"github.com/lightningnetwork/lnd/lnrpc/invoicesrpc"
"github.com/lightningnetwork/lnd/lnrpc/neutrinorpc"
"github.com/lightningnetwork/lnd/lnrpc/peersrpc"
"github.com/lightningnetwork/lnd/lnrpc/routerrpc"
"github.com/lightningnetwork/lnd/lnrpc/signrpc"
@@ -66,6 +67,10 @@ type subRPCServerConfigs struct {
// as a gRPC service.
PeersRPC *peersrpc.Config `group:"peersrpc" namespace:"peersrpc"`
// NeutrinoKitRPC is a sub-RPC server that exposes functionality allowing
// a client to interact with a running neutrino node.
NeutrinoKitRPC *neutrinorpc.Config `group:"neutrinorpc" namespace:"neutrinorpc"`
// RouterRPC is a sub-RPC server the exposes functionality that allows
// clients to send payments on the network, and perform Lightning
// payment related queries such as requests for estimates of off-chain
@@ -250,6 +255,13 @@ func (s *subRPCServerConfigs) PopulateDependencies(cfg *Config,
reflect.ValueOf(genAmpInvoiceFeatures),
)
case *neutrinorpc.Config:
subCfgValue := extractReflectValue(subCfg)
subCfgValue.FieldByName("NeutrinoCS").Set(
reflect.ValueOf(cc.Cfg.NeutrinoCS),
)
// RouterRPC isn't conditionally compiled and doesn't need to be
// populated using reflection.
case *routerrpc.Config: