XRPLF / clio

An XRP Ledger API Server
https://xrpl.org
ISC License
61 stars 52 forks source link

"account_lines" with "ignore_default" parameter is not returning empty lines. #375

Closed mounikakun closed 1 year ago

mounikakun commented 1 year ago

Work around:

Sample request: { "method": "account_lines", "params": [ { "account": "r4s4fjL4HdrWmyUSeJYd4GFAXCBN3n18ad", "ignore_default": true } ] }

Rippled response: { "result": { "account": "r4s4fjL4HdrWmyUSeJYd4GFAXCBN3n18ad", "ledger_current_index": 22929992, "lines": [], "status": "success", "validated": false } }

Clio response: { "result": { "account": "r4s4fjL4HdrWmyUSeJYd4GFAXCBN3n18ad", "ledger_hash": "3694E5F6F640EBDF86967C7F683B85D7AFB7FC2A9932CF42620D0D74C208F587", "ledger_index": 22929927, "lines": [ { "account": "rnpAyYtbn4zo8utuyYLNz5G41hNvbVk28o", "balance": "-10000", "currency": "USD", "limit": "0", "limit_peer": "10000", "quality_in": 0, "quality_out": 0, "no_ripple": true, "no_ripple_peer": false } ], "validated": true, "status": "success" }, "warnings": [ { "id": 2001, "message": "This is a clio server. clio only serves validated data. If you want to talk to rippled, include 'ledger_index':'current' in your request" } ] }

FYI: There's no mention of ignore_default parameter in account_lines documentation so not sure of expected response (https://xrpl.org/account_lines.html#account_lines Here's the link of ignore_default code in rippled https://github.com/nbougalis/rippled/commit/daccb5b4c0e86dd1d6217fe33f42f487211b2fb1

cjcobb23 commented 1 year ago

why are testing undocumented API flags? Not totally sure we should mirror this

mounikakun commented 1 year ago

There's an existing test which is automated for rippled. While running rippled tests on Clio, I noticed this behavior of "account_lines" with "ignore_default".

cjcobb23 commented 1 year ago

where did the existing test come from? As in how did someone know to test this if its not documented?

mounikakun commented 1 year ago

As far as I know, this test was automated before "account_lines" was documented.