Tweak/improve core api substate version mapping
Summary
Small improvements to https://github.com/radixdlt/babylon-node/pull/946
Details
- The as-performant-as-before version macro
_single_versioned!now makes use of the.as_unique_version()method for single-versioned types which is only available on substates with a single version - else it gives a compiler error. - If you have a multi-versioned substate, you can use an alternative
..._multi_versioned!macro. This only updates to the latest if the substate isn't already the latest, as a little perf optimisation.
Testing
Automated tests still pass. Clippy via ./gradlew spotlessApply now passes without warnings.
Docker tags docker.io/radixdlt/private-babylon-node:pr-968 docker.io/radixdlt/private-babylon-node:6a1ae6c06f docker.io/radixdlt/private-babylon-node:sha-6a1ae6c
Codecov Report
Attention: Patch coverage is 0% with 59 lines in your changes missing coverage. Please review.
Please upload report for BASE (
develop@b6bdff8). Learn more about missing BASE report.
Additional details and impacted files
@@ Coverage Diff @@
## develop #968 +/- ##
=========================================
Coverage ? 42.8%
Complexity ? 4300
=========================================
Files ? 1693
Lines ? 52087
Branches ? 1490
=========================================
Hits ? 22294
Misses ? 29324
Partials ? 469
| Flag | Coverage Δ | |
|---|---|---|
| rust | 42.8% <0.0%> (?) |
Flags with carried forward coverage won't be shown. Click here to find out more.
| Files with missing lines | Coverage Δ | |
|---|---|---|
| ...ore_api/conversions/substates/access_controller.rs | 0.0% <0.0%> (ø) |
|
| ...c/core_api/conversions/substates/account_locker.rs | 0.0% <0.0%> (ø) |
|
| .../core_api/conversions/substates/metadata_module.rs | 0.0% <0.0%> (ø) |
|
| ...e_api/conversions/substates/access_rules_module.rs | 0.0% <0.0%> (ø) |
|
| ...c/core_api/conversions/substates/royalty_module.rs | 0.0% <0.0%> (ø) |
|
| ...server/src/core_api/conversions/substates/pools.rs | 0.0% <0.0%> (ø) |
|
| ...rver/src/core_api/conversions/substates/account.rs | 0.0% <0.0%> (ø) |
|
| ...rver/src/core_api/conversions/substates/package.rs | 0.0% <0.0%> (ø) |
|
| ...ver/src/core_api/conversions/substates/resource.rs | 0.0% <0.0%> (ø) |
|
| ...ore_api/conversions/substates/consensus_manager.rs | 0.0% <0.0%> (ø) |
|
| ... and 1 more |
Quality Gate passed
Issues
0 New issues
0 Accepted issues
Measures
0 Security Hotspots
No data about Coverage
No data about Duplication