[go: nahoru, domu]

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

add listing options to listpays #7385

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

daywalker90
Copy link
Contributor

Fixes #6338 and #6348?

First time writing copy-pasting c code btw

Changelog-Added: JSON-RPC: `listpays` has `index`, `start` and `limit` parameters for listing control.
@Lagrang3
Copy link
Collaborator

Hi @daywalker90. The way I read it it seems that the option index is a boolean not a string, cause you are using it as a flag, right?

@Lagrang3
Copy link
Collaborator
Lagrang3 commented Aug 10, 2024

Instead of 3 extra cmd line arguments you could have only 1. For example index_range:

example 1. I want to see a range of known indexes

lightning-cli -k listpays index_range="[1,10]"

example 2. I want to see the last 10 pays (wit pythonic indexing):

lightning-cli -k listpays index_range="[-10,:]"

I think it is very useful to be able to see the last N pays instead of the first N pays.

@daywalker90
Copy link
Contributor Author

I wanted it to be the same as index, start and limit in listinvoices and listforwards

@Lagrang3
Copy link
Collaborator

I wanted it to be the same as index, start and limit in listinvoices and listforwards

Cool. I didn't know about those.

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.

[Feature] listpays, listinvoices: display most recent N
3 participants