multi: add sub-server dep

This commit is contained in:
ErikEk
2021-08-23 04:59:06 +02:00
parent b2646edc52
commit 635cffa871
8 changed files with 22 additions and 7 deletions

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: