lnd icon indicating copy to clipboard operation
lnd copied to clipboard

invoices: fix SQL invoice query pagination

Open bhandras opened this issue 8 months ago • 1 comments

Previously paginated queries offseted the add_index_get, add_index_let, settle_index_get and settle_index_let parameters with the paginators current page offset, however this was incorrect as we can just use SQL's LIMIT/OFFSET to paginate. This commit fixes this issue and adds an optional parameter to the constructor of the invoice SQL store to set page size. This is useful when testing as we can now cover pagination correctly with our existing unit tests.

bhandras avatar Jun 21 '24 16:06 bhandras