mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-07-12 22:22:36 +02:00
rpcserver+invoicesrpc: alias-aware AddInvoice,AddHoldInvoice rpc
AddInvoice,AddHoldInvoice now issue invoices that include our peer's aliases. Some extra sanity checks are included to ensure we don't leak our confirmed SCID for a private channel.
This commit is contained in:
@ -121,7 +121,8 @@ func (s *subRPCServerConfigs) PopulateDependencies(cfg *Config,
|
||||
getNodeAnnouncement func() (lnwire.NodeAnnouncement, error),
|
||||
updateNodeAnnouncement func(modifiers ...netann.NodeAnnModifier) error,
|
||||
parseAddr func(addr string) (net.Addr, error),
|
||||
rpcLogger btclog.Logger) error {
|
||||
rpcLogger btclog.Logger,
|
||||
getAlias func(lnwire.ChannelID) (lnwire.ShortChannelID, error)) error {
|
||||
|
||||
// First, we'll use reflect to obtain a version of the config struct
|
||||
// that allows us to programmatically inspect its fields.
|
||||
@ -257,6 +258,9 @@ func (s *subRPCServerConfigs) PopulateDependencies(cfg *Config,
|
||||
subCfgValue.FieldByName("GenAmpInvoiceFeatures").Set(
|
||||
reflect.ValueOf(genAmpInvoiceFeatures),
|
||||
)
|
||||
subCfgValue.FieldByName("GetAlias").Set(
|
||||
reflect.ValueOf(getAlias),
|
||||
)
|
||||
|
||||
case *neutrinorpc.Config:
|
||||
subCfgValue := extractReflectValue(subCfg)
|
||||
|
Reference in New Issue
Block a user