invoicerpc: Allow user specify routing hints.
This commit is contained in:
1 parent
1c96cc7e10
commit
4463a4ce17
5 files changed
+141
-2
No files matched your search
@@ -4745,6 +4745,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,
|
||||
@@ -4753,6 +4758,7 @@ func (r *rpcServer) AddInvoice(ctx context.Context,
|
||||
FallbackAddr: invoice.FallbackAddr,
|
||||
CltvExpiry: invoice.CltvExpiry,
|
||||
Private: invoice.Private,
|
||||
RouteHints: routeHints,
|
||||
}
|
||||
|
||||
if invoice.RPreimage != nil {
|
||||
|
||||
Reference in new issue
Block a user