XRPLF / rippled

Decentralized cryptocurrency blockchain daemon implementing the XRP Ledger protocol in C++
https://xrpl.org
ISC License
4.51k stars 1.46k forks source link

Expose all amendments known by libxrpl #5026

Closed godexsoft closed 3 months ago

godexsoft commented 4 months ago

High Level Overview of Change

There is no way for consumers like Clio to get all known amendments/features thru libxrpl. This PR adds a public function to do just that as well as some tests for it.

Please note that this adds only what is needed for Clio and nothing more. If there is desire to expose the raw VoteBehavior it can be added. Let me know.

Context of Change

Clio needs the ability to get all known amendments in order to implement the feature API (non-admin part).

Type of Change

API Impact

None.

codecov-commenter commented 4 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 71.3%. Comparing base (ae7ea33) to head (9a56122).

Additional details and impacted files [![Impacted file tree graph](https://app.codecov.io/gh/XRPLF/rippled/pull/5026/graphs/tree.svg?width=650&height=150&src=pr&token=i2RPGI5xGF&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=XRPLF)](https://app.codecov.io/gh/XRPLF/rippled/pull/5026?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=XRPLF) ```diff @@ Coverage Diff @@ ## develop #5026 +/- ## ======================================= Coverage 71.3% 71.3% ======================================= Files 796 796 Lines 66887 66900 +13 Branches 10867 10866 -1 ======================================= + Hits 47690 47705 +15 + Misses 19197 19195 -2 ``` | [Files](https://app.codecov.io/gh/XRPLF/rippled/pull/5026?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=XRPLF) | Coverage Δ | | |---|---|---| | [src/ripple/protocol/Feature.h](https://app.codecov.io/gh/XRPLF/rippled/pull/5026?src=pr&el=tree&filepath=src%2Fripple%2Fprotocol%2FFeature.h&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=XRPLF#diff-c3JjL3JpcHBsZS9wcm90b2NvbC9GZWF0dXJlLmg=) | `100.0% <ø> (ø)` | | | [src/ripple/protocol/impl/Feature.cpp](https://app.codecov.io/gh/XRPLF/rippled/pull/5026?src=pr&el=tree&filepath=src%2Fripple%2Fprotocol%2Fimpl%2FFeature.cpp&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=XRPLF#diff-c3JjL3JpcHBsZS9wcm90b2NvbC9pbXBsL0ZlYXR1cmUuY3Bw) | `94.6% <100.0%> (+0.7%)` | :arrow_up: | ... and [1 file with indirect coverage changes](https://app.codecov.io/gh/XRPLF/rippled/pull/5026/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=XRPLF) [![Impacted file tree graph](https://app.codecov.io/gh/XRPLF/rippled/pull/5026/graphs/tree.svg?width=650&height=150&src=pr&token=i2RPGI5xGF&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=XRPLF)](https://app.codecov.io/gh/XRPLF/rippled/pull/5026?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=XRPLF)