mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-09-14 10:29:29 +02:00
channeldb: export pagination method
We export some methods related to the pagination logic be the kv store implemenation of the payment data will live in another package.
This commit is contained in:
@@ -553,7 +553,7 @@ func (d *DB) QueryInvoices(_ context.Context, q invpkg.InvoiceQuery) (
|
||||
|
||||
// Create a paginator which reads from our add index bucket with
|
||||
// the parameters provided by the invoice query.
|
||||
paginator := newPaginator(
|
||||
paginator := NewPaginator(
|
||||
invoiceAddIndex.ReadCursor(), q.Reversed, q.IndexOffset,
|
||||
q.NumMaxInvoices,
|
||||
)
|
||||
@@ -603,7 +603,7 @@ func (d *DB) QueryInvoices(_ context.Context, q invpkg.InvoiceQuery) (
|
||||
|
||||
// Query our paginator using accumulateInvoices to build up a
|
||||
// set of invoices.
|
||||
if err := paginator.query(accumulateInvoices); err != nil {
|
||||
if err := paginator.Query(accumulateInvoices); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user