mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-08-26 13:42:49 +02:00
invoicesrpc: add HTLC modifier to invoices RPC server
This commit integrates the HTLC modifier service into the invoices RPC server.
This commit is contained in:
@@ -122,7 +122,8 @@ func (s *subRPCServerConfigs) PopulateDependencies(cfg *Config,
|
||||
updateNodeAnnouncement func(features *lnwire.RawFeatureVector,
|
||||
modifiers ...netann.NodeAnnModifier) error,
|
||||
parseAddr func(addr string) (net.Addr, error),
|
||||
rpcLogger btclog.Logger, aliasMgr *aliasmgr.Manager) error {
|
||||
rpcLogger btclog.Logger, aliasMgr *aliasmgr.Manager,
|
||||
invoiceHtlcModifier *invoices.HtlcModificationInterceptor) error {
|
||||
|
||||
// First, we'll use reflect to obtain a version of the config struct
|
||||
// that allows us to programmatically inspect its fields.
|
||||
@@ -241,6 +242,9 @@ func (s *subRPCServerConfigs) PopulateDependencies(cfg *Config,
|
||||
subCfgValue.FieldByName("InvoiceRegistry").Set(
|
||||
reflect.ValueOf(invoiceRegistry),
|
||||
)
|
||||
subCfgValue.FieldByName("HtlcModifier").Set(
|
||||
reflect.ValueOf(invoiceHtlcModifier),
|
||||
)
|
||||
subCfgValue.FieldByName("IsChannelActive").Set(
|
||||
reflect.ValueOf(htlcSwitch.HasActiveLink),
|
||||
)
|
||||
|
Reference in New Issue
Block a user