lnrpc+rpcserver: thread GenAmpInvoiceFeatures to invoicesrpc
This commit is contained in:
5 files changed
+29
-9
No files matched your search
@@ -54,6 +54,10 @@ type AddInvoiceConfig struct {
|
||||
// GenInvoiceFeatures returns a feature containing feature bits that
|
||||
// should be advertised on freshly generated invoices.
|
||||
GenInvoiceFeatures func() *lnwire.FeatureVector
|
||||
|
||||
// GenAmpInvoiceFeatures returns a feature containing feature bits that
|
||||
// should be advertised on freshly generated AMP invoices.
|
||||
GenAmpInvoiceFeatures func() *lnwire.FeatureVector
|
||||
}
|
||||
|
||||
// AddInvoiceData contains the required data to create a new invoice.
|
||||
|
||||
@@ -55,4 +55,8 @@ type Config struct {
|
||||
// GenInvoiceFeatures returns a feature containing feature bits that
|
||||
// should be advertised on freshly generated invoices.
|
||||
GenInvoiceFeatures func() *lnwire.FeatureVector
|
||||
|
||||
// GenAmpInvoiceFeatures returns a feature containing feature bits that
|
||||
// should be advertised on freshly generated AMP invoices.
|
||||
GenAmpInvoiceFeatures func() *lnwire.FeatureVector
|
||||
}
|
||||
@@ -308,14 +308,15 @@ func (s *Server) AddHoldInvoice(ctx context.Context,
|
||||
invoice *AddHoldInvoiceRequest) (*AddHoldInvoiceResp, error) {
|
||||
|
||||
addInvoiceCfg := &AddInvoiceConfig{
|
||||
AddInvoice: s.cfg.InvoiceRegistry.AddInvoice,
|
||||
IsChannelActive: s.cfg.IsChannelActive,
|
||||
ChainParams: s.cfg.ChainParams,
|
||||
NodeSigner: s.cfg.NodeSigner,
|
||||
DefaultCLTVExpiry: s.cfg.DefaultCLTVExpiry,
|
||||
ChanDB: s.cfg.RemoteChanDB,
|
||||
Graph: s.cfg.LocalChanDB.ChannelGraph(),
|
||||
GenInvoiceFeatures: s.cfg.GenInvoiceFeatures,
|
||||
AddInvoice: s.cfg.InvoiceRegistry.AddInvoice,
|
||||
IsChannelActive: s.cfg.IsChannelActive,
|
||||
ChainParams: s.cfg.ChainParams,
|
||||
NodeSigner: s.cfg.NodeSigner,
|
||||
DefaultCLTVExpiry: s.cfg.DefaultCLTVExpiry,
|
||||
ChanDB: s.cfg.RemoteChanDB,
|
||||
Graph: s.cfg.LocalChanDB.ChannelGraph(),
|
||||
GenInvoiceFeatures: s.cfg.GenInvoiceFeatures,
|
||||
GenAmpInvoiceFeatures: s.cfg.GenAmpInvoiceFeatures,
|
||||
}
|
||||
|
||||
hash, err := lntypes.MakeHash(invoice.Hash)
|
||||
|
||||
Reference in new issue
Block a user