-
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
The ledger command does not include "delivered_amount" field in transaction metadata #3431
Comments
This is related: https://github.com/ripple/rippled/issues/2599 [Sorry for closing -- accidental click.] |
I looked into this. The "meta" vs "metaData" issue is because of here: https://github.com/ripple/rippled/blob/f43aeda49c5362dc83c66507cae2ec71cfa7bfdf/src/ripple/app/ledger/impl/LedgerToJson.cpp#L133 We even will use "meta" if you request binary data, but "metaData" otherwise. Definitely should fix that. "validated" is not a field of each transaction, but applies to all of the returned data. Either all of the data is validated, or none is. If you scroll all the way to the bottom, you will find I did not see "DeliveredAmount" in the output. I only saw "delivered_amount". I traced the code as well and could not find how "DeliveredAmount" could possibly end up in the output. This is the code that populates the delivered amount field: https://github.com/ripple/rippled/blob/f43aeda49c5362dc83c66507cae2ec71cfa7bfdf/src/ripple/rpc/impl/DeliveredAmount.cpp#L154 |
I reran this with the exact request that you specified and was able to see "DeliveredAmount". I saw a "DeliveredAmount" field as well as a "delivered_amount" field. Previously I had tried with a different ledger, and there was only "delivered_amount". |
Also, the |
Hi I could try to fix it. |
Is this being worked by someone? I can also pick it. |
@giorgosHadji - I do not think anyone is working on this. You can pick it. |
Issue Description
The
ledger
RPC command has a different format for metadata than thetx
RPC command. In theledger
command's response,metaData
(notmeta
) is found.DeliveredAmount
(notdelivered_amount
) is found. It is also missingvalidated
field. This should be fixed to matchtx
command's response.Steps to Reproduce
Go to https://xrpl.org/websocket-api-tool.html#ledger
Choose full history server and send the following request
{ "id": 1, "command": "ledger", "ledger_index": 36527098, "full": false, "expand": true, "transactions": true, "accounts": false }
Search the output for BFC631D4C12229F6F2BD14203349100356DFB72F4FD4067B9C7A4EFAB9850770. Note you'll find "metaData" (not "meta"), that contains "DeliveredAmount" (not "delivered_amount") and no "validated" field.
Go to https://xrpl.org/websocket-api-tool.html#tx
Post
{ "id": 1, "command": "tx", "transaction": "BFC631D4C12229F6F2BD14203349100356DFB72F4FD4067B9C7A4EFAB9850770" }
You'll find "meta", "delivered_amount" and "validated".
Expected Result
Actual Result
Environment
Supporting Files
sample outputs are included.
ledger.txt
tx.txt
Exported from RIPD-1599
The text was updated successfully, but these errors were encountered: