rpcserver: include new proto fields in ListInvoices rpc
This commit is contained in:
parent
8e151ffd3f
commit
012d4f5c8c
@ -2888,6 +2888,7 @@ func (r *rpcServer) ListInvoices(ctx context.Context,
|
|||||||
IndexOffset: req.IndexOffset,
|
IndexOffset: req.IndexOffset,
|
||||||
NumMaxInvoices: req.NumMaxInvoices,
|
NumMaxInvoices: req.NumMaxInvoices,
|
||||||
PendingOnly: req.PendingOnly,
|
PendingOnly: req.PendingOnly,
|
||||||
|
Reversed: req.Reversed,
|
||||||
}
|
}
|
||||||
invoiceSlice, err := r.server.chanDB.QueryInvoices(q)
|
invoiceSlice, err := r.server.chanDB.QueryInvoices(q)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
@ -2898,10 +2899,11 @@ func (r *rpcServer) ListInvoices(ctx context.Context,
|
|||||||
// into it's proto representation.
|
// into it's proto representation.
|
||||||
resp := &lnrpc.ListInvoiceResponse{
|
resp := &lnrpc.ListInvoiceResponse{
|
||||||
Invoices: make([]*lnrpc.Invoice, len(invoiceSlice.Invoices)),
|
Invoices: make([]*lnrpc.Invoice, len(invoiceSlice.Invoices)),
|
||||||
|
FirstIndexOffset: invoiceSlice.FirstIndexOffset,
|
||||||
LastIndexOffset: invoiceSlice.LastIndexOffset,
|
LastIndexOffset: invoiceSlice.LastIndexOffset,
|
||||||
}
|
}
|
||||||
for i, invoice := range invoiceSlice.Invoices {
|
for i, invoice := range invoiceSlice.Invoices {
|
||||||
resp.Invoices[i], err = createRPCInvoice(invoice)
|
resp.Invoices[i], err = createRPCInvoice(&invoice)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user