-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Sometimes json-rpc ledger api returns undocumented response. (Version: v1.8.4) #4107
Comments
What is the request that is generating this response? The first response looks like a validated ledger, the second response looks like the current ledger. If you request It does look like there's a gap in the documentation related to the BTW, I noticed you linked to the xrpl-dev-portal github repo for documentation. That is the "source" used to publish to xrpl.org, which I recommend unless you're looking for unpublished info on upcoming features. |
Thank you. The request which generated the response should be something like this.
And the request was sent to our hosting node (which is running in p2p mode).
So, this wound not be our case.
Thanks 👍 |
It is possible to request the
My assumption right now is that the way you're deciding which index to request has some kind of bug. For example, if it's incrementing a counter and polling, you may need to handle this case by having a short delay and trying again. If it's event-driven based on a subscription to rippled's ledger stream, there may be a race condition. My example code has a race condition the other way in that if the ledger validated between the first command and the last, it won't return the open ledger.
You're welcome! |
Ah, thank you! Probably that's the case I'm facing. I think it's nicer to have this behaviour documented as you mentioned here. #4107 (comment) |
Issue Description
Somtimes json-rpc ledger api returns undocumented response.
Steps to Reproduce
Unknown. (My speculation is, this happens when the requested ledger is already proposed but not yet validated)
Expected Result
Json-rpc ledger api should return documented response here like below, or if this is intented behavior, better to be documeneted.
Actual Result
Some keys (ex. "ledger_index") are missing and some keys ("ledger_current_index") are added.
Environment
rippled: v1.8.4
The text was updated successfully, but these errors were encountered: