lnrpc+rpcserver: thread GenAmpInvoiceFeatures to invoicesrpc

This commit is contained in:
Conner Fromknecht committed 2021-05-10 16:55:17 -07:00
1 parent e97da53676
commit 6a7d3c4b5e
5 files changed
+29 -9

No files matched your search

+4
View File
@@ -100,6 +100,7 @@ func (s *subRPCServerConfigs) PopulateDependencies(cfg *Config,
anchorTowerClient wtclient.Client,
tcpResolver lncfg.TCPResolver,
genInvoiceFeatures func() *lnwire.FeatureVector,
genAmpInvoiceFeatures func() *lnwire.FeatureVector,
rpcLogger btclog.Logger) error {
// First, we'll use reflect to obtain a version of the config struct
@@ -230,6 +231,9 @@ func (s *subRPCServerConfigs) PopulateDependencies(cfg *Config,
subCfgValue.FieldByName("GenInvoiceFeatures").Set(
reflect.ValueOf(genInvoiceFeatures),
)
subCfgValue.FieldByName("GenAmpInvoiceFeatures").Set(
reflect.ValueOf(genAmpInvoiceFeatures),
)
// RouterRPC isn't conditionally compiled and doesn't need to be
// populated using reflection.