-
Notifications
You must be signed in to change notification settings - Fork 156
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 a stream PurchaseTicket grpc call. #2296
Comments
The call should already be cancellable. Are you seeing otherwise? I assume this request is mostly about mixed ticket buying, because of the potentially long wait period for a mix to occur? There is not much other information to provide during this. |
Oh yea haven't tried, probably it's cancellable, but not in the GUI, how does the cancel work ? is it by context cancellation ?
Yes, so probably we can return when mixing started and |
Yep, with the context. I'm not sure how this works on the javascript side, but you should be able to cancel a specific ongoing request.
I'm not sure what you mean by mixed balance. If you mean the ticket price it buys at, and the (slightly higher) value of the mixed outputs from the split tx, this doesn't change over the duration of the call. The request should error out if the ticket price changes because the window rolls over. I know the autobuyer does this, but I think calling PurchaseTickets directly might not (the mix might still complete, but the ticket purchase would fail). |
Currently the
PurchaseTicket
grpc returns one response when it's done. Because of this limitation the ticket purchaseUX in decrediton is not smooth as users don't get any feedback during the process. See decred/decrediton#3926.
We would like to add a stream grpc call, which will allow us return various statuses during the process and would make the call cancellable.
@alexlyp @jrick Any idea which statuses would be helpful here, I will inspect the current func flow and see at which
stages it would make sense to return an update to the consumer.
The text was updated successfully, but these errors were encountered: