lnrpc+rpcserver: thread GenAmpInvoiceFeatures to invoicesrpc

This commit is contained in:
Conner Fromknecht
2021-05-06 09:15:01 -07:00
parent e97da53676
commit 6a7d3c4b5e
5 changed files with 29 additions and 9 deletions

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.