Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make reversed listinvoices consistent in edge cases #1992

Merged
merged 2 commits into from
Oct 25, 2018

Conversation

halseth
Copy link
Contributor

@halseth halseth commented Sep 28, 2018

Previously a call to QueryInvoices with reversed=true and index_offset=1
would make the cursor point to the first available invoice (num 1) that
would be returned as part of the response. This is inconsistent with the
other indexes, so we instead just return an empty list in this case.

A test case for this situation is also added.

…ndex 1

Previously a call to QueryInvoices with reversed=true and index_offset=1
would make the cursor point to the first available invoice (num 1) that
would be returned as part of the response. This is inconsistent with the
othre indexes, so we instead just return an empty list in this case.

A test case for this situation is also added.
@halseth halseth changed the title Make reversed listinvoices consistent at edges. Make reversed listinvoices consistent in edge cases Sep 28, 2018
Copy link
Contributor

@wpaulino wpaulino left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice test additions! LGTM 🎲

@halseth halseth added this to the 0.5.2 milestone Oct 6, 2018
Copy link
Member

@Roasbeef Roasbeef left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM ⚔️

@halseth halseth merged commit 9cba3e8 into lightningnetwork:master Oct 25, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants