centrifuge / centrifuge-chain

Centrifuge Chain: the layer-1 blockchain for real-world assets, built on Substrate.
https://centrifuge.io
GNU Lesser General Public License v3.0
184 stars 81 forks source link

Reactor: Decoupling pool-registry from pool-system and pool-fees #1983

Open lemunozm opened 3 months ago

lemunozm commented 3 months ago

Description

The intention of this PR is to clean the mess we currently have when testing/benchmarking pool things from pool-registry PoV. Production logic is almost untouched, only for cases that affect the benchmarking

NOTE: Current tests do not cover everything, but they cover what the same they covered before the refactor.

Changes and Descriptions

codecov[bot] commented 2 months ago

Codecov Report

Attention: Patch coverage is 17.24138% with 96 lines in your changes missing coverage. Please review.

Project coverage is 48.15%. Comparing base (927af06) to head (6f94dba).

Files with missing lines Patch % Lines
pallets/pool-system/src/impls.rs 10.38% 69 Missing :warning:
libs/mocks/src/pools.rs 50.00% 8 Missing :warning:
pallets/pool-fees/src/lib.rs 0.00% 7 Missing :warning:
pallets/pool-registry/src/benchmarking.rs 0.00% 3 Missing :warning:
libs/traits/src/lib.rs 0.00% 2 Missing :warning:
pallets/pool-registry/src/lib.rs 66.66% 2 Missing :warning:
pallets/pool-system/src/benchmarking.rs 0.00% 2 Missing :warning:
pallets/pool-fees/src/benchmarking.rs 0.00% 1 Missing :warning:
runtime/altair/src/lib.rs 0.00% 1 Missing :warning:
runtime/centrifuge/src/lib.rs 0.00% 1 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #1983 +/- ## ========================================== - Coverage 48.28% 48.15% -0.13% ========================================== Files 183 183 Lines 13406 13359 -47 ========================================== - Hits 6473 6433 -40 + Misses 6933 6926 -7 ``` | [Flag](https://app.codecov.io/gh/centrifuge/centrifuge-chain/pull/1983/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=centrifuge) | Coverage Δ | | |---|---|---| | [](https://app.codecov.io/gh/centrifuge/centrifuge-chain/pull/1983/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=centrifuge) | `48.15% <17.24%> (?)` | | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=centrifuge#carryforward-flags-in-the-pull-request-comment) to find out more.

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