mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-07-12 14:12:27 +02:00
invoicerpc: Allow user specify routing hints.
This commit is contained in:
@ -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