remove the type filter from "ledger" RPC command #4934
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
High Level Overview of Change
This issue was reported on the Javascript client library: XRPLF/xrpl.js#2611
The
type
filter (Note: as of the latest version of rippled,type
parameter is deprecated) does not work as expected. This PR removes thetype
filter from theledger
command.Context of the bug
I have not investigated the full extent of this issue. I have reproduced the issue on this branch: https://github.com/XRPLF/rippled/compare/develop...ckeshava:rippled:failingTestCasesTypeFilter?expand=1
Note: The above branch has annotations about which portions of the codebase are responsible for the wrong behavior.
Both
ledger_data
andledger
commands must behave identically with respect to thetype
filter, but that is not the case. While the above branch demonstrates failing tests, I'd like to highlight two tests that work correctly:rippled/src/test/rpc/LedgerRPC_test.cpp
Line 2241 in 8a2f6be
This behavior occurs because of a specific combination of
expand
,accounts
andfull
parameters in theledger
command.Type of Change
.gitignore
, formatting, dropping support for older tooling)API Impact
Public API: New feature (new methods and/or new fields)
Public API: Breaking change (in general, breaking changes should only impact the next api_version)
type
parameter can no longer be used with theledger
RPC commandlibxrpl
change (any change that may affectlibxrpl
or dependents oflibxrpl
)Peer protocol change (must be backward compatible or bump the peer protocol version)
No impact on performance of rippled