Merge pull request #3672 from breez/invoice-hints

Allow user specify routing hints in private invoice.
This commit is contained in:
Olaoluwa Osuntokun authored and GitHub committed 2020-11-11 19:57:49 -08:00
commit 99b0913562
5 files changed
+141 -2

No files matched your search

+6
View File
@@ -4730,6 +4730,11 @@ func (r *rpcServer) AddInvoice(ctx context.Context,
return nil, err
}
// Convert the passed routing hints to the required format.
routeHints, err := invoicesrpc.CreateZpay32HopHints(invoice.RouteHints)
if err != nil {
return nil, err
}
addInvoiceData := &invoicesrpc.AddInvoiceData{
Memo: invoice.Memo,
Value: value,
@@ -4738,6 +4743,7 @@ func (r *rpcServer) AddInvoice(ctx context.Context,
FallbackAddr: invoice.FallbackAddr,
CltvExpiry: invoice.CltvExpiry,
Private: invoice.Private,
RouteHints: routeHints,
}
if invoice.RPreimage != nil {