-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Pre-lending protocol refactoring 2: STParsedJSON #5591
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
base: ximinez/lending-refactoring-1
Are you sure you want to change the base?
Pre-lending protocol refactoring 2: STParsedJSON #5591
Conversation
…actoring-2 * ximinez/lending-refactoring-1: (57 commits) Fix formatting Remove `include(default)` from libxrpl profile (#5587) refactor: Change boost::shared_mutex to std::shared_mutex (#5576) Fix macos runner (#5585) Remove the type filter from "ledger" RPC command (#4934) refactor: Update date, libarchive, nudb, openssl, sqlite3, xxhash packages (#5567) test: Run unit tests regardless of 'Supported' amendment status (#5537) Retire Flow Cross amendment (#5562) chore: Update CI to use Conan 2 (#5556) fixAMMClawbackRounding: adjust last holder's LPToken balance (#5513) chore: Add gcc-12 workaround (#5554) Add MPT related txns into issuer's account history (#5530) chore: Remove unused headers (#5526) fix: add allowTrustLineLocking flag for account_info (#5525) Downgrade required CMake version for Antithesis SDK (#5548) fix: Link with boost libraries explicitly (#5546) chore: Fix compilation error with clang-20 and cleanup (#5543) test: Remove circular jtx.h dependencies (#5544) Decouple CredentialHelpers from xrpld/app/tx (#5487) fix: crash when trace-logging in tests (#5529) ...
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## ximinez/lending-refactoring-1 #5591 +/- ##
===============================================================
Coverage ? 78.7%
===============================================================
Files ? 816
Lines ? 71827
Branches ? 8468
===============================================================
Hits ? 56507
Misses ? 15320
Partials ? 0
🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing Code Coverage.
This patch will add a new STParseJSON_test.cpp and should give you 100% on your changes. https://gist.github.com/dangell7/a129e1032a88d6c13e64c57e42b2427a
If you don't want the full refactor its the last 3 tests in testParseJSONEdgeCases
in STParseJSON_test.
Thanks for the patch! I verified that the code was moved over with no changes. I also renamed the file and class to (In the future, it may save us both time if you push a commit to a new branch, and just give me the commit ID, which I can then cherry-pick.) |
- Move several tests from `STObject_test` to new `STParsedJSON_test` unchanged. - Add 3 test cases to cover edge cases for UInt16 values. Co-authored-by: Denis Angell <[email protected]>
Is If its not testable and you want to keep it can we add an exclude?
|
else | ||
{ | ||
ret = detail::make_stvar<STResult>( | ||
field, beast::lexicalCastThrow<Integer>(value.asString())); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should this be field, safe_cast<typename STResult::value_type>(beast::lexicalCastThrow<Integer>( . . .
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor comment aside (which I do not feel strongly about, but some response would be appreciated) this is good.
High Level Overview of Change
This PR is number two of four which contain several small changes that are used as the baseline of #5270. Since they are significant and useful, I created this separate PR to get them merged sooner.
The base of this branch is #5590. The expectation is that they'll be merged in order.
(This one is a pure refactor, and does not add or change functionality.)
Context of Change
#5270 is large and complicated, and I had to lay some groundwork before I could implement the feature.
Type of Change
Before / After
Highlights:
parseLeaf
to break the handlers forSTI_UINT16
andSTI_UINT32
into separate helper functions. This is mainly to improve readability and add some reusability. It was going to be the base for functionality that I abandoned as unnecessary.