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

rpc: add getticketsstatus request #833

Closed
alexlyp opened this issue Jun 30, 2017 · 1 comment
Closed

rpc: add getticketsstatus request #833

alexlyp opened this issue Jun 30, 2017 · 1 comment

Comments

@alexlyp
Copy link
Member

alexlyp commented Jun 30, 2017

This could be added to both rpc-json and grpc.

Request: GetTicketsStatus with an option for number to return (100 or something being default).

Response: List of tickets' statuses for each ticket 'owned' by the wallet (possibly in imported or base accounts). Short list of information that each status would contain: ticket price, current status (voted, expired, revoked...), ticket age if still pending, net gain/loss, txids votes/revokes, votechoices if applicable, and possibly a few more as we flush it out.

With this we should be able to construct a pretty clear picture to users about their staking information.

This call will be very similar to getstakeinfo, but will actually flush out values instead of mere total tabulation.

Obviously this could end up being extremely intensive for wallet/daemon, but with possible optimization (decred/dcrd#681) it shouldn't be too demanding. In the case of grpc would could also stream results to avoid too much strain at once.

@jolan
Copy link
Contributor

jolan commented Jun 30, 2017

stakepool needs something like this too. We currently depend on the stakepooluserinfo RPC which is indexed/fast but it has bugs and it would be nice to remove that in favor of a more generic RPC that could be used both by the wallet and by the stakepool.

There's also a ticketsforaddress RPC that can be removed too. That was the predecessor to stakepooluserinfo.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants