-
Notifications
You must be signed in to change notification settings - Fork 37.7k
rpc: Add options argument to listtransactions, with paginatebypointer options #19443
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
rpc: Add options argument to listtransactions, with paginatebypointer options #19443
Conversation
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. ReviewsSee the guideline for information on the review process.
If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update. ConflictsReviewers, this pull request conflicts with the following ones:
If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first. |
concept ACK, this is a pretty straight forward improvement I think as far as an API is concerned. Would be helpful to find people needing this API to test. |
4d64902
to
fd18204
Compare
Addressed review comment by @luke-jr , agree this way is better. |
fd18204
to
d233809
Compare
Rebased (+ options|skip changes required by #19994). |
Added fifth param to `listtransactions` named `options`, `options` may be an object containing `paginatebypointer` (boolean default: false) and `nextpagepointer` (string default: OMITTED). With `paginatebypointer` output will have the following changes. 1. Return transactions is ordered by most recent transactions. Though the default does reverse the order after transactions are fetched and clipped. 2. `skip` argument has no effect. Instead `nextpagepointer` will be used for pagination. 3. Return value is an object containing, records (array of txs) and nextpagepointer (string) Co-authored-by: Kristaps Kaupe <kristaps@blogiem.lv>
d233809
to
480df47
Compare
@@ -4492,7 +4652,7 @@ static const CRPCCommand commands[] = | |||
{ "wallet", "listreceivedbyaddress", &listreceivedbyaddress, {"minconf","include_empty","include_watchonly","address_filter"} }, | |||
{ "wallet", "listreceivedbylabel", &listreceivedbylabel, {"minconf","include_empty","include_watchonly"} }, | |||
{ "wallet", "listsinceblock", &listsinceblock, {"blockhash","target_confirmations","include_watchonly","include_removed"} }, | |||
{ "wallet", "listtransactions", &listtransactions, {"label|dummy","count","skip","include_watchonly"} }, | |||
{ "wallet", "listtransactions", &listtransactions, {"label|dummy","count","options|skip","include_watchonly"} }, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can remove this diff, and then rebase
🐙 This pull request conflicts with the target branch and needs rebase. Want to unsubscribe from rebase notifications on this pull request? Just convert this pull request to a "draft". |
Tried this with new argument added according to the examples. TBH this looks complex compared to PR 22775 or maybe I am not using it correctly. Only thing I noticed different which could be helpful in some cases was |
@prayank23 Most of the complexity is for |
There hasn't been much activity lately and the patch still needs rebase. What is the status here?
|
@kristapsk are you still working on this? |
#19762 shouldn't be relevant to this. Even if both named and positional are supported, the pure positional API should be clean. |
Yes |
#22807 is rebased, don't think it's worth rebasing this before that one is either merged or rejected. |
There hasn't been much activity lately and the patch still needs rebase. What is the status here?
|
Made this a draft for now then. |
There hasn't been much activity lately and the patch still needs rebase. What is the status here?
|
1 similar comment
There hasn't been much activity lately and the patch still needs rebase. What is the status here?
|
Are you still working on this? If not, maybe close for now? |
There hasn't been much activity lately and the patch still needs rebase. What is the status here?
|
Closing due to lack of activity. Feel free to ping if this is picked up again. |
This is #14898 rebased against current master, review comments addressed and help text updated with output changes when
pageinatebypointer
option is used.Added fifth param toPreviouslisttransactions
namedoptions
,skip
argument is replaced withoptions
, with backwards compatibility, where it's treated as askip
if it's integer, not an object.options
may be an object containingpaginatebypointer
(boolean default: false) andnextpagepointer
(string default: OMITTED).~With
paginatebypointer
output will have the following changes.skip
argument has no effect. Insteadnextpagepointer
will be used for pagination.