XRPLF / rippled

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

Unit tests for AMM offer overflow fix #4986

Closed Bronek closed 2 months ago

Bronek commented 2 months ago

High Level Overview of Change

Unit tests for https://github.com/XRPLF/rippled/pull/4968

Context of Change

Type of Change

ckeshava commented 2 months ago

@gregtatcam I agree, please view it here: https://github.com/Bronek/rippled/pull/1

Qualitatively, the LOB offers are being used when one side of the AMM is being overwhelmed by sendmax parameter. This makes sense because LOB provides better quality offers whereas the AMM becomes capital-inefficient towards extremities.

However, I'm not familiar enough with the synthetic offer generation process to validate the actual numbers myself. Let me know if I can improve the validation further.

codecov-commenter commented 2 months ago

Codecov Report

Attention: Patch coverage is 72.05882% with 19 lines in your changes are missing coverage. Please review.

Project coverage is 76.98%. Comparing base (659bd99) to head (34ff8e7).

Files Patch % Lines
src/test/app/AMM_test.cpp 72.05% 18 Missing and 1 partial :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## develop #4986 +/- ## =========================================== + Coverage 76.97% 76.98% +0.01% =========================================== Files 1129 1129 Lines 131958 132026 +68 Branches 39576 39604 +28 =========================================== + Hits 101570 101639 +69 - Misses 24423 24447 +24 + Partials 5965 5940 -25 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.